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
Prior to mypy 1.7, we were able to add decorators on top of properties by adding a # type: ignore comment. In 1.7.1, the decorated attribute now errors on access with not callable [operator].
error: "Foo" not callable [operator]
self.foo
^~~~~~~~
In my case, I wish to use decorator as a simple "wrapper flag" for a metaclass mechanism, that is unwrapped before class creation.
I know that it is explicitly stated that decorated properties are not supported, but it would be great to at least get away with this simple # type: ignore[prop-decorator] comment. Is there any ongoing investigation on this issue?
Bug Report
Prior to mypy 1.7, we were able to add decorators on top of properties by adding a
# type: ignore
comment. In 1.7.1, the decorated attribute now errors on access withnot callable [operator]
.To Reproduce
https://mypy-play.net/?mypy=1.7.1&python=3.11&gist=12b3add6be6394238695b9b42c79d425
Expected Behavior
No errors.
Actual Behavior
Your Environment
The text was updated successfully, but these errors were encountered: