Skip to content

Commit c127508

Browse files
committed
chore[mypy]: Add snapshot module override
why: The snapshot classes use frozen_dataclass_sealable decorator which adds the seal method at runtime, but mypy cannot detect this during static analysis. what: - Add a mypy override in pyproject.toml to disable 'misc' and 'unused-ignore' error codes specifically for libtmux.snapshot - This allows proper typing without creating false errors from mypy while preserving the runtime functionality
1 parent 5316657 commit c127508

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pyproject.toml

+4
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,10 @@ ignore_errors = true
149149
module = "tests.examples._internal.frozen_dataclass_sealable.test_basic"
150150
ignore_errors = true
151151

152+
[[tool.mypy.overrides]]
153+
module = "libtmux.snapshot"
154+
disable_error_code = ["misc", "unused-ignore"]
155+
152156
[tool.coverage.run]
153157
branch = true
154158
parallel = true

0 commit comments

Comments
 (0)