From 27fa24c5bbd3d272db765b788107e491a18dc0a4 Mon Sep 17 00:00:00 2001 From: Yurii Motov Date: Mon, 2 Feb 2026 22:11:19 +0100 Subject: [PATCH 1/6] Run mypy by pre-commit --- .pre-commit-config.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8717a7c..e71dd06 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -26,3 +26,11 @@ repos: require_serial: true language: unsupported types: [python] + + - id: local-mypy + name: mypy check + entry: uv run mypy src tests + require_serial: true + language: unsupported + pass_filenames: false + types: [python] From 0ba15ce9ff3b7d744147d4305d5508f3244ab52f Mon Sep 17 00:00:00 2001 From: Yurii Motov Date: Tue, 3 Feb 2026 07:08:31 +0100 Subject: [PATCH 2/6] Trigger mypy check --- src/fastapi_cli/empty.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 src/fastapi_cli/empty.py diff --git a/src/fastapi_cli/empty.py b/src/fastapi_cli/empty.py new file mode 100644 index 0000000..e69de29 From 44ee4e945ce6142550363747ab361b5e743aa0bf Mon Sep 17 00:00:00 2001 From: Yurii Motov Date: Tue, 3 Feb 2026 07:17:39 +0100 Subject: [PATCH 3/6] Install dependencies with `--extra standard` in `pre-commit.yml` --- .github/workflows/pre-commit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 210ff5b..5749da1 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -48,7 +48,7 @@ jobs: pyproject.toml uv.lock - name: Install Dependencies - run: uv sync --locked + run: uv sync --locked --extra standard - name: Run prek - pre-commit id: precommit run: uvx prek run --from-ref origin/${GITHUB_BASE_REF} --to-ref HEAD --show-diff-on-failure From 93ada57ac40952e5342f33b48cb75dd4a1aef0d3 Mon Sep 17 00:00:00 2001 From: Yurii Motov Date: Tue, 3 Feb 2026 07:19:48 +0100 Subject: [PATCH 4/6] Address mypy warning --- tests/test_utils_cli.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_utils_cli.py b/tests/test_utils_cli.py index 422e515..db8a9e1 100644 --- a/tests/test_utils_cli.py +++ b/tests/test_utils_cli.py @@ -1,4 +1,5 @@ import logging +from logging.config import dictConfig from pytest import LogCaptureFixture @@ -63,7 +64,7 @@ def test_log_config_does_not_disable_existing_loggers( logger1.setLevel(logging.INFO) logger1.info("Message before configuration") - logging.config.dictConfig(get_uvicorn_log_config()) + dictConfig(get_uvicorn_log_config()) logger2 = logging.getLogger(__name__) From 6ccfdf199951bcbf42c1252d7ddc8204467202dc Mon Sep 17 00:00:00 2001 From: Yurii Motov Date: Tue, 3 Feb 2026 07:24:17 +0100 Subject: [PATCH 5/6] Revert "Trigger mypy check" This reverts commit 0ba15ce9ff3b7d744147d4305d5508f3244ab52f. --- src/fastapi_cli/empty.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 src/fastapi_cli/empty.py diff --git a/src/fastapi_cli/empty.py b/src/fastapi_cli/empty.py deleted file mode 100644 index e69de29..0000000 From 77e4067cba013b25b4396f561bc729653ee75356 Mon Sep 17 00:00:00 2001 From: Yurii Motov Date: Tue, 3 Feb 2026 10:24:41 +0100 Subject: [PATCH 6/6] Remove `types: [python]` from mypy hook in `pre-commit.yaml` --- .pre-commit-config.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e71dd06..c5e3bdb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -33,4 +33,3 @@ repos: require_serial: true language: unsupported pass_filenames: false - types: [python]