Skip to content

Commit

Permalink
mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
awaelchli committed Jul 11, 2024
1 parent 2b0a0ba commit 5e81530
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/litdata/utilities/format.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ def _human_readable_bytes(num_bytes: float) -> str:
return f"{num_bytes:.1f} PB"


def _get_tqdm_iterator_if_available():
def _get_tqdm_iterator_if_available() -> Any:
if _TQDM_AVAILABLE:
from tqdm.auto import tqdm as _tqdm

return _tqdm

def _tqdm(iterator: Any) -> Any:
def _pass_through(iterator: Any) -> Any:
yield from iterator

return _tqdm
return _pass_through

0 comments on commit 5e81530

Please sign in to comment.