Skip to content

use-a-generator hint in sum method #5166

@TiesWestendorp

Description

@TiesWestendorp

Current problem

Running pylint on the following snippet, I get a R1729: Use a generator hint for the all expression, but not for the sum. I suspect that there might be more occurrences where this happens.

all([True for i in range(1)])
sum([True for i in range(1)])

Desired solution

I would expect the same hint for the second line, with the sum method.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions