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

Refactor: allow reduction None #891

Merged
merged 9 commits into from
Mar 18, 2022
Merged

Refactor: allow reduction None #891

merged 9 commits into from
Mar 18, 2022

Conversation

Borda
Copy link
Member

@Borda Borda commented Mar 17, 2022

What does this PR do?

Just to be consistent with other reduction options

Before submitting

  • Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure to update the docs?
  • Did you write any new necessary tests?

PR review

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 🙃

@Borda Borda added the refactoring refactoring and code health label Mar 17, 2022
@codecov
Copy link

codecov bot commented Mar 17, 2022

Codecov Report

Merging #891 (5f95ceb) into master (3af7295) will increase coverage by 0%.
The diff coverage is 100%.

@@          Coverage Diff          @@
##           master   #891   +/-   ##
=====================================
  Coverage      95%    95%           
=====================================
  Files         167    167           
  Lines        6933   6947   +14     
=====================================
+ Hits         6589   6603   +14     
  Misses        344    344           

Copy link
Contributor

@akihironitta akihironitta left a comment

Choose a reason for hiding this comment

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

qq: Is there any difference between

Literal["elementwise_mean", "sum", "none", None]

and

Optional[Literal["elementwise_mean", "sum", "none"]

?

@mergify mergify bot added the ready label Mar 18, 2022
@Borda
Copy link
Member Author

Borda commented Mar 18, 2022

qq: Is there any difference between Literal["elementwise_mean", "sum", "none", None]
and Optional[Literal["elementwise_mean", "sum", "none"]?

it is the same, just had a feeling that less bracket depth makes it easier to read :)

@Borda Borda enabled auto-merge (squash) March 18, 2022 07:42
@Borda Borda merged commit d23c4b3 into master Mar 18, 2022
@Borda Borda deleted the refactor/reduction branch March 18, 2022 14:31
gianscarpe pushed a commit to gianscarpe/metrics that referenced this pull request Apr 21, 2022
* allow reduction None
* Literal

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready refactoring refactoring and code health
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants