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

Add support for Quantity as value in the constructor #1282

Merged
merged 1 commit into from
May 11, 2021

Conversation

jules-ch
Copy link
Collaborator

@jules-ch jules-ch commented Apr 3, 2021

Simplify constructor

  • Handle special cases at first to fail fast

  • Flatten nested conditions

  • Handle units first

  • Convert magnitude if value is Quantity

  • Closes Creating Quantity with Quantity #1231

  • Executed pre-commit run --all-files with no errors

  • The change is fully covered by automated unit tests

  • Documented in docs/ as appropriate

  • Added an entry to the CHANGES file

Simplify constructor
- Handle special cases at first to fail fast
- Flatten nested conditions
- Handle units first
- Convert magnitude if value is Quantity

Closes hgrecco#1231
@jules-ch jules-ch marked this pull request as ready for review April 3, 2021 10:23
@hgrecco hgrecco merged commit 4cf7874 into hgrecco:master May 11, 2021
@hgrecco
Copy link
Owner

hgrecco commented May 11, 2021

Thanks for th PR.

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.

Creating Quantity with Quantity
2 participants