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

Revert Enum default computation #828

Merged
merged 2 commits into from
Jan 27, 2020
Merged

Revert Enum default computation #828

merged 2 commits into from
Jan 27, 2020

Conversation

corranwebster
Copy link
Contributor

Revert enum defaults to using index 0 except for enum.Enums, which instead use the first value returned from the iterator.

This restores the default behaviour to exactly what it was before the introduction of support for enum.Enum other than special-casing default values for enum.Enum.

@codecov-io
Copy link

codecov-io commented Jan 27, 2020

Codecov Report

❗ No coverage uploaded for pull request base (master@b06db02). Click here to learn what that means.
The diff coverage is 77.77%.

Impacted file tree graph

@@           Coverage Diff            @@
##             master    #828   +/-   ##
========================================
  Coverage          ?   72.4%           
========================================
  Files             ?      51           
  Lines             ?    6367           
  Branches          ?    1276           
========================================
  Hits              ?    4610           
  Misses            ?    1363           
  Partials          ?     394
Impacted Files Coverage Δ
traits/trait_types.py 69.73% <100%> (ø)
traits/trait_base.py 61.49% <71.42%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b06db02...183faf3. Read the comment docs.

traits/trait_base.py Outdated Show resolved Hide resolved
traits/trait_base.py Outdated Show resolved Hide resolved
Copy link
Member

@mdickinson mdickinson left a comment

Choose a reason for hiding this comment

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

LGTM; a couple of nitpicks.

@kitchoi Opinions? Does this seem like a satisfactory resolution to #812 to you?

@mdickinson mdickinson requested a review from kitchoi January 27, 2020 14:17
@mdickinson mdickinson added this to the 6.0.0 release milestone Jan 27, 2020
@corranwebster
Copy link
Contributor Author

See #835 for a full proposal.

@kitchoi
Copy link
Contributor

kitchoi commented Jan 27, 2020

Does this seem like a satisfactory resolution to #812 to you?

Yes it does! Thanks both!

@mdickinson mdickinson merged commit 2f3a0f6 into master Jan 27, 2020
@mdickinson mdickinson deleted the fix/revert-enum-default branch January 27, 2020 18:41
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.

4 participants