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

rf: Use list.copy() instead of list() #148

Merged
merged 1 commit into from
Mar 19, 2025

Conversation

effigies
Copy link
Collaborator

Very slight optimization, based on reviewing #135. list() will convert any iterable into a list, which incidentally performs a copy, while list.copy() is an explicit operation. This bypasses input detection logic, but I think more importantly makes the intent clearer. Static type checking can also distinguish these cases.

See also #135 (comment).

I'm not committed to this change, so if this strikes others as less clear or pointless optimization, feel free to close.

Copy link

codecov bot commented Mar 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.00%. Comparing base (22dcd39) to head (06248e5).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #148   +/-   ##
=======================================
  Coverage   96.00%   96.00%           
=======================================
  Files           5        5           
  Lines         250      250           
=======================================
  Hits          240      240           
  Misses         10       10           

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

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@stefanv stefanv added type: Maintenance and removed type: Enhancement New feature or request labels Mar 19, 2025
@stefanv stefanv merged commit 9f05c1e into scientific-python:main Mar 19, 2025
30 of 31 checks passed
@stefanv
Copy link
Member

stefanv commented Mar 19, 2025

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants