Skip to content

Commit 17252d6

Browse files
committed
mypy(config[snapshot]): Add override for property/field conflicts
why: - Snapshot classes have properties that conflict with dataclass field names during type checking - These property/field collisions cause mypy to generate false positive error messages - We need to silence these specific errors without compromising overall type safety what: - Added [[tool.mypy.overrides]] section in pyproject.toml for libtmux.snapshot module - Set disable_error_code = ["override"] to silence property override errors - Placed the override in a module-specific section to limit scope and prevent disabling this error check for other modules refs: Complements the snapshot class refactoring to ensure clean mypy checks
1 parent 0300eb5 commit 17252d6

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
@@ -141,6 +141,10 @@ disable_error_code = ["method-assign"]
141141
module = "libtmux._internal.frozen_dataclass_sealable"
142142
disable_error_code = ["method-assign"]
143143

144+
[[tool.mypy.overrides]]
145+
module = "libtmux.snapshot"
146+
disable_error_code = ["override"]
147+
144148
[[tool.mypy.overrides]]
145149
module = "tests._internal.test_frozen_dataclass_sealable"
146150
ignore_errors = true

0 commit comments

Comments
 (0)