Skip to content

Commit

Permalink
fix: raise minimum Python version for type checking to 3.9 (#416)
Browse files Browse the repository at this point in the history
* raise minimum Python version for mypy to Python 3.9 for compatibility with numpy 1.25.0
  • Loading branch information
alexander-held authored Jul 1, 2023
1 parent b1c4c40 commit 5064e38
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ repos:
rev: v1.3.0
hooks:
- id: mypy
name: mypy with Python 3.8
name: mypy with Python 3.9
files: src/cabinetry
additional_dependencies: ["numpy>=1.22", "boost-histogram>=1.0.1", "click>=8", "types-tabulate", "types-PyYAML"]
args: ["--python-version=3.8"]
# numpy 1.25 is no longer compatible with Python 3.8, so use Python >=3.9 for type checking
args: ["--python-version=3.9"]
- id: mypy
name: mypy with Python 3.11
files: src/cabinetry
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ warn_unreachable = true
warn_unused_ignores = true
strict_equality = true
no_implicit_optional = true
python_version = "3.8"
# numpy 1.25 is no longer compatible with Python 3.8, so use Python >=3.9 for type checking
python_version = "3.9"

[[tool.mypy.overrides]]
module = [
Expand Down

0 comments on commit 5064e38

Please sign in to comment.