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

Error reported when '__annotations__' is accessed #3075

Closed
peterazmanov opened this issue Mar 29, 2017 · 2 comments · Fixed by #3081
Closed

Error reported when '__annotations__' is accessed #3075

peterazmanov opened this issue Mar 29, 2017 · 2 comments · Fixed by #3081

Comments

@peterazmanov
Copy link

peterazmanov commented Mar 29, 2017

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

print(A.__annotations__)

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

checked with mypy v0.501

@JelleZijlstra
Copy link
Member

I'll work on a PR for adding this and other NamedTuple features today.

@JelleZijlstra
Copy link
Member

Actually, the sample code isn't even on a NamedTuple, so this is an independent issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants