Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

property accessed on class incorrectly understood as function, expected property #16090

Open
DetachHead opened this issue Sep 12, 2023 · 0 comments · May be fixed by #18504
Open

property accessed on class incorrectly understood as function, expected property #16090

DetachHead opened this issue Sep 12, 2023 · 0 comments · May be fixed by #18504
Labels
bug mypy got something wrong topic-descriptors Properties, class vs. instance attributes

Comments

@DetachHead
Copy link
Contributor

class Foo:
    @property
    def foo(self) -> int:
        return 1

    reveal_type(foo)  # Revealed type is "def (self: asdf.Foo) -> int"


reveal_type(Foo.foo)  # Revealed type is "def (self: asdf.Foo) -> int"

related: #15911 (comment)

@DetachHead DetachHead added the bug mypy got something wrong label Sep 12, 2023
@AlexWaygood AlexWaygood added the topic-descriptors Properties, class vs. instance attributes label Sep 12, 2023
@sterliakov sterliakov marked this as a duplicate of #18490 Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong topic-descriptors Properties, class vs. instance attributes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants