diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f869f5e..3a4d24f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -23,7 +23,7 @@ repos: hooks: - id: add-trailing-comma - repo: https://github.com/asottile/pyupgrade - rev: v3.16.0 + rev: v3.17.0 hooks: - id: pyupgrade args: [--py38-plus] diff --git a/reorder_python_imports.py b/reorder_python_imports.py index a248771..df8b52f 100644 --- a/reorder_python_imports.py +++ b/reorder_python_imports.py @@ -58,7 +58,7 @@ def _pat(base: str, pats: tuple[str, ...]) -> re.Pattern[str]: ) -def _tokenize(s: str) -> Generator[tuple[Tok, str], None, None]: +def _tokenize(s: str) -> Generator[tuple[Tok, str]]: pos = 0 while True: for tp, reg in TOKENIZE: @@ -268,7 +268,7 @@ def replace_imports( return ret -def _module_to_base_modules(s: str) -> Generator[str, None, None]: +def _module_to_base_modules(s: str) -> Generator[str]: """return all module names that would be imported due to this import-import """