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-21 21:22:15 -0800
commit3a8f3eb25f8cb70194e070cc1185669b5522e0dc (patch)
tree4f6978811d6b50d329426e28af9b050c28a8de10
parent3fe7dc6ebb380acaae2acd75bc7f483864c3d013 (diff)
downloadpep8-issue-357.tar.gz
Only an annotated function if in the first layer of parensissue-357
-rwxr-xr-xpep8.py4
1 files 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