Skip to content

FR: format (or lint with fix) getitem called with tuples litteral (e.g. a[(b, c)] -> a[b, c]) ? #11990

@neutrinoceros

Description

@neutrinoceros

This is an idea for a formatting or linting rule (not sure where it would fit best). Basically I'd like ruff to drop unneeded parentheses from a[(b, c)] (into a[b, c]). This pattern comes up a lot in idiomatic yt, but there are currently no formatter (that we know of) for it, so our docs and code base have two widely spread, competing styles.
I couldn't find a similar open issue, apologies if there is.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ruleImplementing or modifying a lint rule

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions