From 907dddae2c02ec627047c9c85badd180b6907b11 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 30 Jul 2024 12:54:06 +0100 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#105) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/asottile/pyupgrade: v3.16.0 → v3.17.0](https://github.com/asottile/pyupgrade/compare/v3.16.0...v3.17.0) --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- src/django_watchfiles/__init__.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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)