0

Is there a setting in VS Code that automatically puts each argument in a function definition to a new line? I am using black, and if there are enough arguments that the line length is greater than 79 characters then each argument is given a new line, but if the line length is less than 79 then the arguments stay on the same line. I would like a setting that automatically puts each argument on a new line.

What I have:

def func(arg1: str, arg2: int) -> int:

What I want:

def func(
    arg1: str,
    arg2: int
) -> int:
starball
  • 20,030
  • 7
  • 43
  • 238
Anna
  • 29
  • 4
  • @rioV8 if then what? also, they said they're using black? quoting the docs "_Black is the uncompromising Python code formatter._" I'll wager what's being asked here is not possible. – starball Jun 26 '23 at 17:58
  • @rioV8 both sides can do better. the question asker, and the question reader. the stronger has the option to help the weaker. I've edited. – starball Jun 26 '23 at 21:38
  • @starball if I need to guess I most likely guess wrong, if the asker creates ambiguity I can't solve it – rioV8 Jun 26 '23 at 21:40

0 Answers0