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
Closing brackets should match the indentation of the opening bracket.
Anti-pattern
result = function_that_takes_arguments('a', 'b', 'c',
'd', 'e', 'f',
)
Best practice
result = function_that_takes_arguments('a', 'b', 'c',
'd', 'e', 'f',
)
But the pep8 spec says:
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:
my_list = [
1, 2, 3,
4, 5, 6,
]
result = some_function_that_takes_arguments(
'a', 'b', 'c',
'd', 'e', 'f',
)
or it may be lined up under the first character of the line that starts the multiline construct, as in:
my_list = [
1, 2, 3,
4, 5, 6,
]
result = some_function_that_takes_arguments(
'a', 'b', 'c',
'd', 'e', 'f',
)
This rule should allow closing brackets to either align with the opening bracket or the first character of the multiline construct. The explanation should be updated to exclude the following example as an anti-pattern instead.
Anti-pattern
result = function_that_takes_arguments('a', 'b', 'c',
'd', 'e', 'f',
)
The text was updated successfully, but these errors were encountered:
E124 says:
But the pep8 spec says:
This rule should allow closing brackets to either align with the opening bracket or the first character of the multiline construct. The explanation should be updated to exclude the following example as an anti-pattern instead.
The text was updated successfully, but these errors were encountered: