Rename module from lyrics-dl
to lrc-dl
This commit is contained in:
parent
4bfcbf17bd
commit
658e1bef77
16 changed files with 52 additions and 52 deletions
14
lrc_dl/utils.py
Normal file
14
lrc_dl/utils.py
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue