Skip to content

Commit

Permalink
Fix: Mypy configuration was inline
Browse files Browse the repository at this point in the history
Solution: Use a dedicated section of pyproject.toml for the configuration of Mypy.

This also adds `check_untyped_defs` to force type checking on all code, annotated or not.
  • Loading branch information
hoh committed Mar 6, 2024
1 parent 30f5ed5 commit d6c7af9
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,12 @@ python = ["3.9", "3.10", "3.11", "3.12"]
detached = true
dependencies = [
"black==24.1.1",
"mypy==1.6.0",
"mypy==1.8.0",
"ruff==0.1.15",
"isort==5.13.2",
]
[tool.hatch.envs.lint.scripts]
typing = "mypy --install-types --non-interactive --ignore-missing-imports --explicit-package-bases {args:src/aleph/vm/ tests/ examples/example_fastapi runtimes/aleph-debian-12-python}"
typing = "mypy {args:src/aleph/vm/ tests/ examples/example_fastapi runtimes/aleph-debian-12-python}"
style = [
# "ruff {args:.}",
"black --check --diff {args:.}",
Expand All @@ -139,6 +139,14 @@ target-version = ["py39"]
line-length = 120
#skip-string-normalization = true

[tool.mypy]
python_version = "3.9"
install_types = true
non_interactive = true
ignore_missing_imports = true
explicit_package_bases = true
check_untyped_defs = true

[tool.ruff]
target-version = "py39"
line-length = 120
Expand Down

0 comments on commit d6c7af9

Please sign in to comment.