Skip to content

Commit 1f0fb3a

Browse files
committed
typing: add mypy configuration
Signed-off-by: Philipp Hahn <[email protected]>
1 parent a278ca9 commit 1f0fb3a

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ recursive-include examples *.py *.elf *.out
44
recursive-include test *
55
global-exclude *.py[cod]
66
global-exclude __pycache__
7+
global-exclude .mypy_cache
78
include README.rst
89
include LICENSE
910
include CHANGES

pyproject.toml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ Homepage = "https://github.com/eliben/pyelftools"
4242
Repository = "https://github.com/eliben/pyelftools.git"
4343
Issues = "https://github.com/eliben/pyelftools/issues"
4444

45+
[dependency-groups]
46+
typing = ["mypy", "pyright", "typeguard"]
47+
4548
[tool.setuptools]
4649
packages = [
4750
"elftools",
@@ -64,3 +67,18 @@ version = {attr = "elftools.__version__"}
6467

6568
[tool.setuptools.package-data]
6669
elftools = ["py.types"]
70+
71+
[tool.mypy]
72+
error_summary = false
73+
disallow_any_generics = true
74+
disallow_untyped_defs = true
75+
disallow_incomplete_defs = true
76+
warn_redundant_casts = true
77+
warn_unused_ignores = true
78+
packages = "elftools"
79+
junit_format = "per_file"
80+
81+
[[tool.mypy.overrides]]
82+
module = "elftools.construct.*"
83+
follow_imports = "skip"
84+
ignore_errors = true

0 commit comments

Comments
 (0)