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

Remove an unnecessary conditional #22

Merged
merged 1 commit into from
Jul 31, 2024

Conversation

kurtmckee
Copy link
Contributor

This PR removes the if chunks: conditional and dedents the conditional block, since if chunks: is always True. Removing the conditional allows the test coverage fail-under value to increase to 100%; previously it was at 99% because the conditional branch never evaluated to False, so branch coverage wasn't complete.

image

It's easy to confirm that the condition will always be True, even when the string being split is empty:

>>> "".split("a")
['']
>>> bool("".split("a"))
True

This expands the test coverage to 100%,
so the fail-under coverage value has been tightened.
@Pevtrick Pevtrick merged commit 4dbf371 into sqids:main Jul 31, 2024
8 checks passed
@Pevtrick
Copy link
Collaborator

Great, thx again!

@kurtmckee kurtmckee deleted the expand-to-100pct-coverage branch July 31, 2024 13:43
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