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 needless import itertools and iterator complexity #158

Merged
merged 1 commit into from
Jan 20, 2025

Conversation

hukkin
Copy link
Contributor

@hukkin hukkin commented Jan 20, 2025

Functionally this shouldn't change anything.

Copy link

codecov bot commented Jan 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.58%. Comparing base (ff2bdef) to head (930cc6e).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #158      +/-   ##
==========================================
- Coverage   95.69%   95.58%   -0.11%     
==========================================
  Files           2        2              
  Lines         209      204       -5     
==========================================
- Hits          200      195       -5     
  Misses          9        9              
Flag Coverage Δ
macos-latest 92.64% <100.00%> (-0.18%) ⬇️
ubuntu-latest 93.13% <100.00%> (-0.17%) ⬇️
windows-latest 92.64% <100.00%> (-0.18%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


if None in results:
no_copy = True
missing = True
results = (r for r in results if r)
results = tuple(r for r in results if r)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This currently works as a generator too, but seems a bit dangerous. The generator is used twice in the code that follows, so on the second time (i.e. results = "".join(results)) it will be empty. Luckily in that case the value results is always unused. So it works, but just barely ;)

@hugovk hugovk added the changelog: Changed For changes in existing functionality label Jan 20, 2025
@hugovk hugovk merged commit 6bb70de into hugovk:main Jan 20, 2025
31 of 32 checks passed
@hugovk
Copy link
Owner

hugovk commented Jan 20, 2025

Thanks!

@hukkin hukkin deleted the rm-itertools branch January 20, 2025 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: Changed For changes in existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants