Invalid setattr() call
Detects invalid usage of setattr() built-in function, which bypasses type checking and can lead to runtime type errors.
setattr() allows dynamic attribute assignment, letting you assign any type to any attribute regardless of type annotations. Type checkers can't track these dynamic modifications.
What gets flagged
| Python | |
|---|---|
1 2 3 4 5 6 | |
Unsoundness Checker Output
| Text Only | |
|---|---|
1 2 3 4 5 6 7 8 9 | |
Mypy: No Diagnostic Emitted
Pyright: No Diagnostic Emitted
Ty: No Diagnostic Emitted