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

Consider splitting C419 for sum/min/max into its own rule #10838

Open
carljm opened this issue Apr 8, 2024 · 0 comments
Open

Consider splitting C419 for sum/min/max into its own rule #10838

carljm opened this issue Apr 8, 2024 · 0 comments
Labels
linter Related to the linter needs-decision Awaiting a decision from a maintainer
Milestone

Comments

@carljm
Copy link
Contributor

carljm commented Apr 8, 2024

As discussed in #3259 (comment), the performance impact of switching from comprehension to generator is different if you are passing to a short-circuiting function (e.g. any or all) vs a non-short-circuiting one (sum, min, max). Given these differing tradeoffs, it would be reasonable for a project to want to enable the lint for short-circuiting cases, and not the others. This suggests that we should split them into separate rules (or add a config option), as requested in #10759 (comment)

@carljm carljm added needs-decision Awaiting a decision from a maintainer linter Related to the linter labels Apr 8, 2024
@carljm carljm added this to the v0.4.0 milestone Apr 8, 2024
@dhruvmanila dhruvmanila modified the milestones: v0.4.0, v0.5.0 Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linter Related to the linter needs-decision Awaiting a decision from a maintainer
Projects
None yet
Development

No branches or pull requests

2 participants