diff --git a/pyproject.toml b/pyproject.toml index 28a50916..48646d8b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,7 +47,7 @@ dev = [ "black == 24.4.2", "flake8 == 7.0.0", "flake8-bugbear == 24.4.26", - "mypy == 1.9.0", + "mypy == 1.10.0", "ufmt == 2.7.0", "usort == 1.0.8.post1", ] diff --git a/src/fixit/engine.py b/src/fixit/engine.py index 2e56dda5..41300449 100644 --- a/src/fixit/engine.py +++ b/src/fixit/engine.py @@ -9,7 +9,7 @@ from contextlib import contextmanager from dataclasses import replace from pathlib import Path -from typing import Collection, Iterable, Iterator, Mapping, Optional, Set +from typing import Collection, Generator, Iterator, Mapping, Optional, Set from libcst import CSTNode, CSTTransformer, Module, parse_module from libcst.metadata import FullRepoManager, MetadataWrapper, ProviderT @@ -60,7 +60,7 @@ def collect_violations( rules: Collection[LintRule], config: Config, timings_hook: Optional[TimingsHook] = None, - ) -> Iterable[LintViolation]: + ) -> Generator[LintViolation, None, int]: """Run multiple `LintRule`s and yield any lint violations. The optional `timings_hook` parameter will be called (if provided) after all