-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Labels
formatterRelated to the formatterRelated to the formatterstyleHow should formatted code lookHow should formatted code look
Description
The current indentation behavior for function parameters is: 4-space indentation at function definitions, like this:
def my_function(
my_function_arg_1,
my_function_arg_2,
my_function_arg_3,
my_function_arg_4,
):
pass
This leads to reduced readability, because the function name and the argument names become harder to distinguish.
Adding one more level of indentation greatly improves readability:
def my_function(
my_function_arg_1,
my_function_arg_2,
my_function_arg_3,
my_function_arg_4,
):
pass
PEP8 also has the same suggestion: https://peps.python.org/pep-0008/#indentation
Originally posted by @jsh9 in #7310 (comment)
jsh9, LeonarddeR, shenef, rwightman, endrebak and 35 morejankatins, T-256, twmr, peekxc, andy-from-meiro and 5 morerwightman, endrebak, michael-hazell and tfluehmannmichael-hazell, veritas9872, fushall and tfluehmann
Metadata
Metadata
Assignees
Labels
formatterRelated to the formatterRelated to the formatterstyleHow should formatted code lookHow should formatted code look