Skip to content

Disable formatter for specific lines #8415

@sparisi

Description

@sparisi

Say I have a function like f(a, b, c, d, e, f) (with longer var names) that gets split into

f(
 a,
 b, 
 c, 
 d, 
 e, 
 f,
)

I'd prefer to have

f(
 a, b, c,
 d, e, f,
)

so I would like ruff formatter to ignore it.
I know there are noqa comments that work for the linter, but I can't make them work for the formatter as well. Is it possible to do something like that?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionAsking for support or clarification

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions