Rename module from lyrics-dl to lrc-dl

This commit is contained in:
mrsobakin 2024-11-11 05:25:48 +03:00
parent 4bfcbf17bd
commit 658e1bef77
No known key found for this signature in database
GPG key ID: 325CBF665E4FFD6E
16 changed files with 52 additions and 52 deletions

14
lrc_dl/utils.py Normal file
View file

@ -0,0 +1,14 @@
from typing import Iterator, Optional, TypeVar
def threshold_equal(a: float, b: float, epsilon: float) -> bool:
return abs(a - b) <= epsilon
T = TypeVar('T')
def next_or_none(iterator: Iterator[T]) -> Optional[T]:
try:
return next(iterator)
except StopIteration:
return None