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
It's not clear to me that issue #4165 is actually resolved. I'm still running into a problem with abstract properties. Was #4165 closed because this issue intends to fix that?
I just opened a PR #15395 that will fix #4165 for deleters. However, as you can see in the test case I added it doesn't fix this false negative issue, either for setters or deleters.
Python docs say that properties can have individual abstract parts: https://docs.python.org/3/library/abc.html#abc.abstractproperty
So, let's see what mypy thinks about it.
abstract getter
It is supported ✅
abstract setter
Not supported 🚫
Should instead say:
# error: Cannot instantiate abstract class "Child" with abstract attribute "x"
Or even better
with abstract property setter "x"
abstract getter and setter
However, this does not fully cover this case:
We can add additional note about
x.setter
being abstract. Or we can keep this as is.Related:
Overloaded method has both abstract and non-abstract variants
#4165The text was updated successfully, but these errors were encountered: