diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 130e3c7..70f481f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -28,7 +28,7 @@ repos: additional_dependencies: - tomli==2.0.1 - repo: https://github.com/asottile/pyupgrade - rev: v3.16.0 + rev: v3.17.0 hooks: - id: pyupgrade args: [--py38-plus] diff --git a/src/django_watchfiles/__init__.py b/src/django_watchfiles/__init__.py index 2c05d6e..da77de9 100644 --- a/src/django_watchfiles/__init__.py +++ b/src/django_watchfiles/__init__.py @@ -34,7 +34,7 @@ def set_roots(self, roots: set[Path]) -> None: def stop(self) -> None: self.stop_event.set() - def __iter__(self) -> Generator[Any, None, None]: # TODO: better type + def __iter__(self) -> Generator[Any]: # TODO: better type while True: self.change_event.clear() for changes in watchfiles.watch( @@ -81,7 +81,7 @@ def watched_roots(self, watched_files: list[Path]) -> frozenset[Path]: sys_paths = set(autoreload.sys_path_directories()) return frozenset((*extra_directories, *watched_file_dirs, *sys_paths)) - def tick(self) -> Generator[None, None, None]: + def tick(self) -> Generator[None]: watched_files = list(self.watched_files(include_globs=False)) roots = set(autoreload.common_roots(self.watched_roots(watched_files))) self.watcher.set_roots(roots)