Skip to content

Enum has no attribute "__members__" #3017

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

Closed
gopar opened this issue Mar 16, 2017 · 2 comments
Closed

Enum has no attribute "__members__" #3017

gopar opened this issue Mar 16, 2017 · 2 comments

Comments

@gopar
Copy link

gopar commented Mar 16, 2017

Mypy spits out error: "SomeEnum" has no attribute "__members__" with the following code:

from enum import Enum

class SomeEnum(Enum):
    ONE = 1
    TWO = 2

SomeEnum.__members__

__members__ exists and is documented in the py docs

Mypy version: 0.501
Python: 3.6.0

@JelleZijlstra
Copy link
Member

I think this is being tracked in python/typeshed#854.

@gvanrossum
Copy link
Member

Indeed. I should pick up my work on Enum.

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

No branches or pull requests

3 participants