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

Fix Union to use default_value for setting static default #1115

Merged
merged 3 commits into from
May 20, 2020

Conversation

kitchoi
Copy link
Contributor

@kitchoi kitchoi commented May 19, 2020

Closes #1104

This PR makes Union use default_value instead of default for defining static default. This name is consistent with other trait types.

Unfortunately Either uses default instead and is an anomaly. In order to help downstream code migrates, an error is raised if a metadata named 'default' is found.

Expanded user manual to mention the different naming used for static defaults in Either and Union.

Checklist

  • Tests
  • Update API reference (docs/source/traits_api_reference)
  • Update User manual (docs/source/traits_user_manual)
  • Update type annotation hints in traits-stubs: default_value is not mentioned there

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

@mdickinson mdickinson merged commit 1ef9efa into master May 20, 2020
@mdickinson mdickinson deleted the 1104-union-default-with-doc branch May 20, 2020 07:11
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.

NoneTrait and Union use a different metadata name for static default
2 participants