Skip to content

Commit

Permalink
feat: update Python version to 3.12 and add mypy configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
polischuks committed Feb 12, 2025
1 parent ffceadf commit 3f86864
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- uses: actions/checkout@v4
- uses: ./.github/workflows/actions/prepare
with:
python-version: "3.11"
python-version: "3.12"
- name: Mypy
run: poetry run mypy .
shell: bash
Expand Down
25 changes: 25 additions & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[mypy]
python_version = 3.12
plugins = numpy.typing.mypy_plugin

check_untyped_defs = True
disallow_any_generics = True
disallow_untyped_calls = True
disallow_untyped_decorators = True
explicit_package_bases = True
ignore_errors = False
ignore_missing_imports = True
implicit_reexport = False
strict_equality = True
strict_optional = True
warn_no_return = True
warn_redundant_casts = True
warn_unreachable = True
warn_unused_configs = True
warn_unused_ignores = True

# Exclude test files and directories
exclude = (tests/.*)|(.*_test\.py)$

[mypy.plugins.numpy.*]
numpy_check_broadcast_shapes = True
2 changes: 2 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ pandas
scipy
flake8
isort
mypy
ruff

0 comments on commit 3f86864

Please sign in to comment.