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

Cleanup Partition Nullability #881

Merged
merged 1 commit into from
Nov 23, 2022
Merged

Cleanup Partition Nullability #881

merged 1 commit into from
Nov 23, 2022

Conversation

viceroypenguin
Copy link
Contributor

@viceroypenguin viceroypenguin commented Nov 13, 2022

This PR adds to #803. It uses nullable TKey values in the implementation to more accurately express the code.

@codecov
Copy link

codecov bot commented Nov 14, 2022

Codecov Report

Merging #881 (2c8b409) into master (c3a7094) will increase coverage by 0.20%.
The diff coverage is 100.00%.

❗ Current head 2c8b409 differs from pull request most recent head 26b9656. Consider uploading reports for the commit 26b9656 to get more accurate results

@@            Coverage Diff             @@
##           master     #881      +/-   ##
==========================================
+ Coverage   92.38%   92.58%   +0.20%     
==========================================
  Files         110      108       -2     
  Lines        3441     3440       -1     
  Branches     1020     1024       +4     
==========================================
+ Hits         3179     3185       +6     
+ Misses        200      194       -6     
+ Partials       62       61       -1     
Impacted Files Coverage Δ
MoreLinq/Partition.cs 100.00% <100.00%> (+1.75%) ⬆️
MoreLinq/Pad.cs 100.00% <0.00%> (ø)
MoreLinq/FallbackIfEmpty.cs 88.67% <0.00%> (ø)
MoreLinq/Assume.cs
MoreLinq/Debug.cs
MoreLinq/Lookup.cs 64.12% <0.00%> (+2.25%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@atifaziz atifaziz left a comment

Choose a reason for hiding this comment

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

Like PR #882, this make unrelated changes (doc and nullability revisions). Please submit one overall idea/feature per PR.

Copy link
Member

@atifaziz atifaziz left a comment

Choose a reason for hiding this comment

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

Thanks, but the bulk of changes seem to be unrelated (and I've highlighted a few):

  • Formatting changes
  • More eager argument validation
  • Annotation of some arguments with parameter names.

uses nullable TKey values in the implementation to more accurately express the code.

This is the only change that should be in here, which is towards the end of Partition.cs.

I would avoid the temptation to bundle unrelated changes as it has the following downsides:

  • The diff/patch is larger than it needs to be.
  • As a result of the above point, it takes longer to review the PR.
  • The PR subject line or the commit message won't reflect the actual change (lost in the noise).
  • The final commit won't be atomic so, e.g., if someone wants to revert it in the future, it will undo more work than necessary.

MoreLinq/Partition.cs Outdated Show resolved Hide resolved
MoreLinq/Partition.cs Outdated Show resolved Hide resolved
Copy link
Member

@atifaziz atifaziz left a comment

Choose a reason for hiding this comment

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

Thank you!

@atifaziz atifaziz merged commit 9ef27ea into morelinq:master Nov 23, 2022
@viceroypenguin viceroypenguin deleted the partition branch November 23, 2022 21:08
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.

None yet

2 participants