Skip to content

Commit eb817c1

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 cec71a5 commit eb817c1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,10 @@ ignore_errors = true
144144
module = "tests.examples._internal.frozen_dataclass_sealable.test_basic"
145145
ignore_errors = true
146146

147+
[[tool.mypy.overrides]]
148+
module = "libtmux.snapshot"
149+
disable_error_code = ["misc", "unused-ignore"]
150+
147151
[tool.coverage.run]
148152
branch = true
149153
parallel = true

0 commit comments

Comments
 (0)