Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed May 15, 2024
1 parent fcfde43 commit 45a8e53
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/tqdm_publisher/_subscriber.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


class TQDMProgressSubscriber(TQDMProgressPublisher):
def __init__(self, on_progress_update: callable, iterable: Optional[Iterable[Any]]=None, **tqdm_kwargs):
def __init__(self, on_progress_update: callable, iterable: Optional[Iterable[Any]] = None, **tqdm_kwargs):
super().__init__(iterable=iterable, **tqdm_kwargs)

def run_on_progress_update(format_dict: Dict[str, Any]):
Expand Down
6 changes: 3 additions & 3 deletions tests/test_subscriber.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ def test_callback(data):
# Simulate updatse to trigger the callback
for task in asyncio.as_completed(tasks):
await task
subscriber.update(1) # Update by 1 iteration
subscriber.update(1) # Update by 1 iteration

assert n_callback_executions > 1
assert n_callback_executions > 1

subscriber.close()
subscriber.close()

0 comments on commit 45a8e53

Please sign in to comment.