Skip to content

Commit e69f34b

Browse files
author
Jussi Kukkonen
committed
mypy: Enable stricter configuration
We're quite close to being able to enable only "strict = True" but not quite there. In the mean time enable some useful individual settings. disallow_untyped_defs: report an error whenever code contains a function definition without type annotations warn_redundant_casts: report an error whenever code uses an unnecessary cast warn_unused_ignores: report an error whenever code uses an unnecessary # type: ignore comment warn_unreachable: report an error whenever code is determined to be unreachable or redundant Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
1 parent f59fee5 commit e69f34b

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

setup.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ ignore =
99

1010
[mypy]
1111
warn_unused_configs = True
12+
warn_redundant_casts = True
13+
warn_unused_ignores = True
14+
warn_unreachable = True
15+
strict_equality = True
16+
disallow_untyped_defs = True
1217
files = tuf/api/
1318

1419
[mypy-securesystemslib.*]

0 commit comments

Comments
 (0)