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

Enable FURB187 - avoid reverse list copy #18716

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Skylion007
Copy link
Contributor

Enable a ruff rule that avoid copies in list reversal. Use builtin reverse method.
The builtin does an efficient stride reversal and avoids accidental copies.
This is extra helpful since the changed reverses are for perf optimization.

@Skylion007 Skylion007 marked this pull request as draft February 21, 2025 15:30
@Skylion007 Skylion007 force-pushed the skylion007/apply-ruff-FURB187-2025-02-21 branch from a7c673d to 21a28f4 Compare February 21, 2025 15:33
@Skylion007 Skylion007 force-pushed the skylion007/apply-ruff-FURB187-2025-02-21 branch from 21a28f4 to 91bf811 Compare February 21, 2025 15:45
@Skylion007 Skylion007 marked this pull request as ready for review February 21, 2025 15:45
Copy link
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

freqtrade (https://github.com/freqtrade/freqtrade)

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.

1 participant