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

Use the power of get to skip if tests #13

Merged
merged 1 commit into from
Aug 21, 2024

Conversation

muffato
Copy link
Member

@muffato muffato commented Aug 21, 2024

Another take on #12

Because you still had the if tests, many get seemed unnecessary.
The alternative is to take advantage of get to remove the need to check things in advance. Then you can use the second argument of get to define the value you would have used in the else block

PR checklist

  • This comment contains a description of changes (with reason)
  • CHANGELOG.md is updated
  • If you've fixed a bug or added code that should be tested, add tests!
  • Documentation in docs is updated

@muffato muffato requested a review from jvfe August 21, 2024 21:06
@jvfe
Copy link
Collaborator

jvfe commented Aug 21, 2024

Makes much more sense now, thanks!

@jvfe jvfe merged commit 3c493b9 into refact/change_structure Aug 21, 2024
60 of 61 checks passed
@jvfe jvfe deleted the refact/change_structure_leverage_get branch August 21, 2024 22:36
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