-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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 31 morejankatins, T-256, twmr, peekxc, andy-from-meiro and 4 morerwightman, endrebak and michael-hazellmichael-hazell, veritas9872 and fushall
Metadata
Metadata
Assignees
Labels
formatterRelated to the formatterRelated to the formatterstyleHow should formatted code lookHow should formatted code look