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

[mypyc] Fix interaction of Enum caching with _order_ #8120

Merged
merged 3 commits into from Dec 10, 2019
Merged

[mypyc] Fix interaction of Enum caching with _order_ #8120

merged 3 commits into from Dec 10, 2019

Conversation

msullivan
Copy link
Collaborator

@msullivan msullivan commented Dec 10, 2019

_order_ doesn't make it into the Enum, so don't try to read it.

if (
cdef.info.bases
and cdef.info.bases[0].type.fullname == 'enum.Enum'
and lvalue.name != '_order_'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add comment about why we skip _order_, since it's a pretty obscure thing (I had to look it up from the docs).

@msullivan msullivan merged commit 821630c into master Dec 10, 2019
@msullivan msullivan deleted the enum branch December 10, 2019 19:26
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 this pull request may close these issues.

None yet

2 participants