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 Mar 28, 2024
1 parent efb6618 commit 41f65bf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/django_watchfiles/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def watch_safely(f: Callable[[], Iterable[T]], default: T) -> Iterable[T]:
Yield from `f()`, but when it fails, yield `default` once, log the exception and retry,
unless there are 2 exceptions within 1 second, in which case the exception is raised.
"""
ts: Optional[float] = None
ts: float | None = None
while True:
try:
yield from f()
Expand Down Expand Up @@ -68,8 +68,8 @@ def set_roots(self, roots: set[Path]) -> None:
def stop(self) -> None:
self.stop_event.set()

def __iter__(self) -> Generator[Set[FileChange], None, None]:
no_changes: Set[FileChange] = set()
def __iter__(self) -> Generator[set[FileChange], None, None]:
no_changes: set[FileChange] = set()
while True:
self.change_event.clear()
for changes in watch_safely(
Expand Down

0 comments on commit 41f65bf

Please sign in to comment.