-
Notifications
You must be signed in to change notification settings - Fork 216
Open
astral-sh/ruff
#19936Description
If a protocol P has an @property member foo, we currently say that any nominal type N will satisfy P's interface if N has an attribute foo. This is obviously incorrect; we should also consider the type of the member foo on the protocol. For @property members with setters, we should also check whether the foo attribute can be set on N with the type the setter specifies.
Detailed tests for this are already in place at https://github.com/astral-sh/ruff/blob/main/crates/ty_python_semantic/resources/mdtest/protocols.md
Reactions are currently unavailable