From 9f3f91116aef14fb3a287c5217362a4bad1585f3 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 29 Jul 2024 23:24:19 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate 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) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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] From 5293bf5683af75732173fabb5ccab23ea9020ae1 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 29 Jul 2024 23:25:55 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- reorder_python_imports.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 """