Skip to content

Commit 41f65bf

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent efb6618 commit 41f65bf

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/django_watchfiles/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def watch_safely(f: Callable[[], Iterable[T]], default: T) -> Iterable[T]:
3131
Yield from `f()`, but when it fails, yield `default` once, log the exception and retry,
3232
unless there are 2 exceptions within 1 second, in which case the exception is raised.
3333
"""
34-
ts: Optional[float] = None
34+
ts: float | None = None
3535
while True:
3636
try:
3737
yield from f()
@@ -68,8 +68,8 @@ def set_roots(self, roots: set[Path]) -> None:
6868
def stop(self) -> None:
6969
self.stop_event.set()
7070

71-
def __iter__(self) -> Generator[Set[FileChange], None, None]:
72-
no_changes: Set[FileChange] = set()
71+
def __iter__(self) -> Generator[set[FileChange], None, None]:
72+
no_changes: set[FileChange] = set()
7373
while True:
7474
self.change_event.clear()
7575
for changes in watch_safely(

0 commit comments

Comments
 (0)