fix: clear all mypy errors
Annotate untyped containers and Optional attributes, type the stdlib-shaped metric dicts in the client plugins, and add types-PyYAML/types-psutil to the dev extras plus a mypy override for nio/mattermostdriver (no stubs). Behaviour fixes found on the way: enable_kernel_timestamps() now returns False when SO_TIMESTAMP is unknown instead of raising TypeError, send_shutdown is defined at module level so cleanup() cannot hit a NameError, and a failed subprocess returncode falls back to UNKNOWN. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -62,6 +62,8 @@ dev = [
|
||||
"pytest-cov>=4.0",
|
||||
"flake8>=5.0",
|
||||
"mypy>=1.10",
|
||||
"types-PyYAML",
|
||||
"types-psutil",
|
||||
"black>=23.0",
|
||||
"isort>=5.0",
|
||||
"tox>=4.0",
|
||||
@@ -92,5 +94,10 @@ max-line-length = 111
|
||||
[tool.pylint.format]
|
||||
max-line-length = 111
|
||||
|
||||
[[tool.mypy.overrides]]
|
||||
# optional notification libraries that ship neither stubs nor py.typed
|
||||
module = ["nio", "nio.*", "mattermostdriver", "mattermostdriver.*"]
|
||||
ignore_missing_imports = true
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
testpaths = ["tests"]
|
||||
|
||||
Reference in New Issue
Block a user