Skip to content

(🐞) type doesn't meet it's own type as a protocol #17567

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

Open
KotlinIsland opened this issue Jul 23, 2024 · 0 comments
Open

(🐞) type doesn't meet it's own type as a protocol #17567

KotlinIsland opened this issue Jul 23, 2024 · 0 comments
Labels
bug mypy got something wrong

Comments

@KotlinIsland
Copy link
Contributor

from typing import Protocol


class Type(Protocol):
    __name__: str
    __qualname__: str
    __module__: str


a: type[object]
b: Type = object
c: Type = a  # error: Incompatible types in assignment (expression has type "type[object]", variable has type "Type")  [assignment]
a.__name__
a.__qualname__
a.__module__
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong
Projects
None yet
Development

No branches or pull requests

1 participant