summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lee <IanLee1521@gmail.com>2014-12-21 21:22:15 -0800
committerIan Lee <IanLee1521@gmail.com>2014-12-29 10:39:33 -0800
commit219db61762dd442a2a0ec02c2962e2313a0fd128 (patch)
tree1f0b3d307e2fc9205bdd7864722aa5c58e292166
parent4f848e5018e9994a4562b13a0b3ea96b9bade0bf (diff)
downloadpep8-219db61762dd442a2a0ec02c2962e2313a0fd128.tar.gz
Only an annotated function if in the first layer of parens
-rwxr-xr-xpep8.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pep8.py b/pep8.py
index ca57638..67b32d1 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