Skip to content

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

Open
@carljm

Description

@carljm

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    breakingBreaking API changelinterRelated to the linterneeds-decisionAwaiting a decision from a maintainer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions