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 to default if auto is given #26

Merged
merged 2 commits into from
Jun 3, 2024

Conversation

jamesrswift
Copy link
Member

As described in #14, if the tested value is auto the following changes now apply:

  • If default is set, it is applied on auto
  • If default is not set, but optional is true, the tested value is parsed as none without failing
  • If there is no default and it is not optional, an assertion error is thrown

There don't appear to be any regressions but this is a breaking change so its something to keep in our minds if something starts going fucky-wucky later down the line.

Resolves #14

@jamesrswift jamesrswift linked an issue Jun 3, 2024 that may be closed by this pull request
Copy link

@epbuennig epbuennig 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, one small nit regarding the tests.

@jamesrswift jamesrswift merged commit 100ea41 into main Jun 3, 2024
1 check failed
@jamesrswift jamesrswift deleted the 14-handle-default-in-case-of-auto-not-none branch June 3, 2024 13:51
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.

Handle default in case of auto, not none
3 participants