Overriding callable attribute with method not caught by [mutable-override]
#18052
Labels
bug
mypy got something wrong
[mutable-override]
#18052
Bug Report
Follows from #12569, #3208
Mypy has an optional error code
mutable-override
that checks for unsafe overrides of mutable attributes:However, this error isn't emitted when overriding a callable attribute with a method:
This allows dubious code like the following to pass type checking:
Your Environment
--strict --enable-error-code=mutable-override
mypy.ini
(and other config files): N/A (empty)The text was updated successfully, but these errors were encountered: