You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Add 4 spaces (an extra level of indentation) to distinguish arguments from the rest.
def long_function_name(
var_one, var_two, var_three,
var_four):
print(var_one)
The text was updated successfully, but these errors were encountered:
@stefanoborini I'm 👍 on this but I do want to point out that your formatting suggestion actually does not comply with PEP8:
The closing brace/bracket/parenthesis on multiline constructs may either line up under the first non-whitespace character of the last line of list, as in:
[...]
or it may be lined up under the first character of the line that starts the multiline construct, as in:
[...]
Not that I blame you, I do actually quite like that construct. But in the spirit of following PEP8 — it bugs me that black explicitly breaks with it so I shouldn't be tempted to do the same when convenient — I think it should be:
This particular style choice of Black also troubles me. That's what motivated me to start a more configurable formatter based on a fork from Black: https://github.com/jsh9/cercis
My project already supports indenting by 8 spaces at function definitions. And I plan to add more configurable options.
Please feel free to try it out and provide feedback.
This:
Should be formatted like this
To comply with PEP-8 indentation directives:
The text was updated successfully, but these errors were encountered: