Skip to content

Commit 219db61

Browse files
committed
Only an annotated function if in the first layer of parens
1 parent 4f848e5 commit 219db61

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pep8.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -777,9 +777,9 @@ def whitespace_around_named_parameter_equals(logical_line, tokens):
777777
parens += 1
778778
elif text == ')':
779779
parens -= 1
780-
elif in_def and text == ':':
780+
elif in_def and text == ':' and parens == 1:
781781
annotated_func_arg = True
782-
elif parens and text == ',':
782+
elif parens and text == ',' and parens == 1:
783783
annotated_func_arg = False
784784
elif parens and text == '=' and not annotated_func_arg:
785785
no_space = True

0 commit comments

Comments
 (0)