-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
Description
Consider this code:
class Descr:
def __get__(self, inst: Any, owner: Any) -> int: ...
class Proto(Protocol):
x: int
class C:
x = Descr()
a: Proto = C()
I think it should be allowed. This can be done by simply re-using the logic in analyze_member_access
in checkmember.py
, see also #5136.
bryanforbes, glyph, cancan101, flaeppe and FeuermurmelDanilo-Gomez, rows-s and alan-andrade