Skip to content

Error reported when '__annotations__' is accessed #3075

Description

@peterazmanov
class A:
    a: int = 0
    b: int = 1

print(A.__annotations__)

mypy output:
error: "A" has no attribute "__annotations__"

checked with mypy v0.501

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions