Skip to content

Commit

Permalink
Move mypy config for new code in pyproject.toml
Browse files Browse the repository at this point in the history
Move configuration for mypy linting tool over the refactored code
in pyproject.toml. This is done in order to have one unified place
where we will have the 30+ lines exclusion list of old test files
we don't want to lint.

Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
  • Loading branch information
MVrachev committed Oct 25, 2021
1 parent de71708 commit 430fa1c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 18 deletions.
21 changes: 21 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -169,3 +169,24 @@ notes="TODO"

[tool.pylint.STRING]
check-quote-consistency="yes"

# mypy section
[tool.mypy]
warn_unused_configs = "True"
warn_redundant_casts = "True"
warn_unused_ignores = "True"
warn_unreachable = "True"
strict_equality = "True"
disallow_untyped_defs = "True"
disallow_untyped_calls = "True"
files = [
"tuf/api/",
"tuf/ngclient",
"tuf/exceptions.py"
]

[tool.mypy-securesystemslib]
ignore_missing_imports = "True"

[tool.mypy-urllib3]
ignore_missing_imports = "True"
18 changes: 0 additions & 18 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,3 @@ ignore =
.fossa.yml
.readthedocs.yaml

[mypy]
warn_unused_configs = True
warn_redundant_casts = True
warn_unused_ignores = True
warn_unreachable = True
strict_equality = True
disallow_untyped_defs = True
disallow_untyped_calls = True
files =
tuf/api/,
tuf/ngclient,
tuf/exceptions.py

[mypy-securesystemslib.*]
ignore_missing_imports = True

[mypy-urllib3.*]
ignore_missing_imports = True

0 comments on commit 430fa1c

Please sign in to comment.