Commit 269869b
committed
pyproject.toml(chore[lint,types]): Exclude frozen_dataclass_sealable tests from strict checking
why:
The frozen_dataclass_sealable decorator adds attributes and methods dynamically
at runtime which causes false positive errors with static analysis tools.
Testing this functionality requires patterns that deliberately violate some
rules.
what:
- Added mypy override to ignore type errors in
tests._internal.test_frozen_dataclass_sealable
- Added mypy override to ignore type errors in
tests.examples._internal.frozen_dataclass_sealable.test_basic
- Added per-file ignore for RUF009 (function call in default argument) in
test_frozen_dataclass_sealable.py
- Preserves strict typing and linting for implementation code while allowing
tests to use dynamic features
refs: This maintains code quality while acknowledging the inherent
limitations of static analysis tools when dealing with Python's dynamic runtime
features1 parent bc6666b commit 269869b
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
| 230 | + | |
230 | 231 | | |
231 | 232 | | |
232 | 233 | | |
| |||
0 commit comments