Skip to content

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

Open
@KotlinIsland

Description

@KotlinIsland
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__

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugmypy got something wrong

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions