Skip to content

Commit 0875119

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 7758e14 commit 0875119

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
@@ -136,6 +136,10 @@ disable_error_code = ["method-assign"]
136136
module = "libtmux._internal.frozen_dataclass_sealable"
137137
disable_error_code = ["method-assign"]
138138

139+
[[tool.mypy.overrides]]
140+
module = "libtmux.snapshot"
141+
disable_error_code = ["override"]
142+
139143
[[tool.mypy.overrides]]
140144
module = "tests._internal.test_frozen_dataclass_sealable"
141145
ignore_errors = true

0 commit comments

Comments
 (0)