+full refactor
+feat: configuration, progress bar, OSV
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Iterable, Iterator, Optional, TypeVar
|
||||
|
||||
T = TypeVar("T")
|
||||
|
||||
|
||||
def progress(iterable: Iterable[T], *, total: Optional[int] = None, desc: str = "") -> Iterator[T]:
|
||||
try:
|
||||
from tqdm import tqdm # type: ignore
|
||||
|
||||
return iter(tqdm(iterable, total=total, desc=desc))
|
||||
except Exception:
|
||||
return iter(iterable)
|
||||
Reference in New Issue
Block a user