Commit 2d24c31
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 bf239de commit 2d24c31
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
| 235 | + | |
235 | 236 | | |
236 | 237 | | |
237 | 238 | | |
| |||
0 commit comments