Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#105)
Browse files Browse the repository at this point in the history
<!--pre-commit.ci start-->
updates:
- [github.com/asottile/pyupgrade: v3.16.0 →
v3.17.0](asottile/pyupgrade@v3.16.0...v3.17.0)
<!--pre-commit.ci end-->

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] authored Jul 30, 2024
1 parent cf2d7bd commit 907ddda
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
4 changes: 2 additions & 2 deletions src/django_watchfiles/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 907ddda

Please sign in to comment.