How to remove trailing comma for Python code formatter Ruff

264 Views Asked by At

Before applying the ruff formatter

def method(arg1, arg2, arg3, ..., arg10):

After applying the ruff formatter

def method(
    arg1,
    arg2,
    arg3,
    ...,
    arg10,
)

Is there a way to configure the ruff formatter to remove the trailing comma next to arg10 by passing an argument to ruff.format.args?

"ruff.format.args": ["remove-trailing-comma"]
0

There are 0 best solutions below