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 a bug with attribute defaults and add default_factory parameter #649

Merged
merged 1 commit into from
Oct 24, 2024

Conversation

MaxDall
Copy link
Collaborator

@MaxDall MaxDall commented Oct 24, 2024

This PR

  • fixes a bug where attributes annotated with Optional raised an error when parsing a default value
  • adds a parameter default_factory to attribute so that one can set a default for Unions which do not include None
  • adds a test case to test default values for attributes

Copy link
Collaborator

@addie9800 addie9800 left a comment

Choose a reason for hiding this comment

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

Looks good 👍

@MaxDall MaxDall merged commit 92b348a into master Oct 24, 2024
4 checks passed
@MaxDall MaxDall deleted the fix-a-bug-with-attribute-defaults-values branch October 24, 2024 19:43
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.

2 participants