Search code examples
pythonpycharmstyling

How to set tab indent for function arguments in PyCharm?


Instead of double indent for function arguments

def foo(
        name
):
    print('hello ' + name)

I would like to use single indent:

def foo(
    name
):
    print('hello ' + name)

=> How can I tell PyCharm to use single indent for function arguments?

Unfortunately, under

Settings => Editor => Code Style => Python => Tabs and Indents 

there does not seem to be an extra option for it:

enter image description here

As an alternative: what is the rational behind using extra indent for the arguments?


Solution

  • Facepalm ... its the option "Continuation indent".