Skip to content

Commit

Permalink
Move mypy config to pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
jodal committed May 27, 2022
1 parent 1ba21c3 commit 70020ca
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 19 deletions.
20 changes: 20 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,26 @@ target-version = ["py37", "py38", "py39"]
[tool.isort]
profile = "black"

[tool.mypy]
no_implicit_optional = true
strict_equality = true
warn_return_any = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_unused_configs = true

[[tool.mypy.overrides]]
# Options that only applies to src, and not tests
module = "pykka.*"
disallow_untyped_defs = true

[[tool.mypy.overrides]]
module = [
"importlib.*", # importlib types are missing when running mypy on Python 3.7
"pytest.*",
]
ignore_missing_imports = true

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
19 changes: 0 additions & 19 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,3 @@ ignore =
Y023
# Y026: Use typing_extensions.TypeAlias for type aliases (until requiring Python 3.10)
Y026


[mypy]
no_implicit_optional = True
warn_return_any = True
warn_redundant_casts = True
warn_unused_ignores = True
warn_unused_configs = True
strict_equality = True

[mypy-importlib.*]
# importlib types are missing when running mypy on Python 3.7
ignore_missing_imports = True

[mypy-pykka.*]
disallow_untyped_defs = True

[mypy-pytest.*]
ignore_missing_imports = True

0 comments on commit 70020ca

Please sign in to comment.