From 6e521ab8f989e83dd6fbfef09de3cc6e4d38d912 Mon Sep 17 00:00:00 2001 From: Lukasz Lancucki Date: Tue, 23 Jun 2026 19:33:51 +0100 Subject: [PATCH] ci: align mypy pre-commit hook env with project runtime deps [MPT-22538] The mirrors-mypy hook runs in an isolated environment whose additional_dependencies only listed python-box, so httpx was not installed there. With mypy strict + ignore_missing_imports, httpx.Auth collapsed to Any and disallow_subclassing_any failed locally on mpt_api_client/auth/base.py ("Class cannot subclass Auth"). CI runs mypy with full deps (make check-all) and stayed green, so this only affected developers running pre-commit locally. Add httpx==0.28.* and httpx-retries==0.5.* to the hook's additional_dependencies, mirroring the pins in pyproject.toml [project].dependencies, so the hook env matches the project and `pre-commit run mypy` passes. Co-Authored-By: Claude Opus 4.8 --- .pre-commit-config.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9023cb64..7c28e735 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -41,3 +41,5 @@ repos: pass_filenames: false additional_dependencies: - python-box==7.3.2 + - httpx==0.28.* + - httpx-retries==0.5.*