You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mypy fails typecheck with the following errors: error: overloaded function has no attribute "setter"
and error: overloaded function has no attribute "fset"
on the following lines: @A.attr.setter and A.attr.fset(self, value)
Your Environment
Mypy version used: 0.961
Mypy command-line flags:
Mypy configuration options from mypy.ini (and other config files):
Python version used: 3.9.9
Operating system and version: macOS 11.6.5
The text was updated successfully, but these errors were encountered:
Bug Report
mypy does not properly verify types while overriding property setters
To Reproduce
Tryto override a property setter in a subclass according to how it is described in https://stackoverflow.com/questions/3336767/overriding-inherited-properties-getters-and-setters-in-python:
Expected Behavior
No errors from mypy
Actual Behavior
mypy fails typecheck with the following errors:
error: overloaded function has no attribute "setter"
and
error: overloaded function has no attribute "fset"
on the following lines:
@A.attr.setter
andA.attr.fset(self, value)
Your Environment
mypy.ini
(and other config files):The text was updated successfully, but these errors were encountered: