Updated pre-commit template (mypy compatible and default Python specified)#
The following updates have been made to the pre-commit template introduced previously.
pre-commit テンプレート の内容を更新。
Main changes#
Add default_language_version
By specifying the Python version, you can prevent pre-commit from grabbing an unintended Python version (e.g. 3.13) when building a virtual environment.
default_language_version: python: python3.11
mypy pre-commit hook support
Integrating type checking into pre-commit ensures consistent checking locally/CI.
Also, the commonly used types-* series is specified in additional_dependencies.
- repo: https://github.com/pre-commit/mirrors-mypy rev: 'v1.10.0' hooks: - id: mypy args: [--install-types] additional_dependencies: - typing-extensions - types-requests - types-toml - types-PyYAML - types-setuptools - types-python-dateutil - pydantic - pydantic-settings
Article information
- author:
Mr. Takagi
- Release date:
2025-07-27
numpy build error in Poetry environment and resolution notes due to version constraints
Adding AGENTS.md to an Existing Sphinx + ablog Technical Note