From 3a8f3eb25f8cb70194e070cc1185669b5522e0dc Mon Sep 17 00:00:00 2001 From: Ian Lee Date: Sun, 21 Dec 2014 21:22:15 -0800 Subject: Only an annotated function if in the first layer of parens --- pep8.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pep8.py b/pep8.py index 5cf1629..b323377 100755 --- a/pep8.py +++ b/pep8.py @@ -777,9 +777,9 @@ def whitespace_around_named_parameter_equals(logical_line, tokens): parens += 1 elif text == ')': parens -= 1 - elif in_def and text == ':': + elif in_def and text == ':' and parens == 1: annotated_func_arg = True - elif parens and text == ',': + elif parens and text == ',' and parens == 1: annotated_func_arg = False elif parens and text == '=' and not annotated_func_arg: no_space = True -- cgit v1.2.1