-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Open
Labels
featurepriority-1-normaltopic-descriptorsProperties, class vs. instance attributesProperties, class vs. instance attributes
Description
from typing import Type
class Foo:
def __set_name__(self, owner: Type['Bar'], name: str) -> None:
...
class Bar:
foo_bar = Foo() # correctly passes
class Baz:
foo_baz = Foo() # should fail
mypy correctly accepts Bar.foo_var, but incorrectly accepts Baz.foo_baz
kawing-chiu, JonathanPlasse and finite-state-machine
Metadata
Metadata
Assignees
Labels
featurepriority-1-normaltopic-descriptorsProperties, class vs. instance attributesProperties, class vs. instance attributes