diff options
author | Ian Cordasco <sigmavirus24@users.noreply.github.com> | 2016-04-08 11:07:25 -0500 |
---|---|---|
committer | Ian Cordasco <sigmavirus24@users.noreply.github.com> | 2016-04-08 11:07:25 -0500 |
commit | eae54ff0e4c50ccc4507e95a2f8689fefb89e70e (patch) | |
tree | 7fcf9f27191a6438bb727f91f0d7f9e8cc006ca3 | |
parent | ac1e249ccb17ca67812262ccfc7c53fa9ff6f0df (diff) | |
parent | 4a37706b95a49ff61a44202f9775146de1e895db (diff) | |
download | pep8-eae54ff0e4c50ccc4507e95a2f8689fefb89e70e.tar.gz |
Merge pull request #497 from agronholm/fix_496
Fixed false E251 error when square brackets are used in function argu…
-rwxr-xr-x | pep8.py | 4 | ||||
-rw-r--r-- | testsuite/E25.py | 3 |
2 files changed, 4 insertions, 3 deletions
@@ -794,9 +794,9 @@ def whitespace_around_named_parameter_equals(logical_line, tokens): if start != prev_end: yield (prev_end, message) if token_type == tokenize.OP: - if text == '(': + if text in '([': parens += 1 - elif text == ')': + elif text in ')]': parens -= 1 elif in_def and text == ':' and parens == 1: annotated_func_arg = True diff --git a/testsuite/E25.py b/testsuite/E25.py index ad8db88..7d00310 100644 --- a/testsuite/E25.py +++ b/testsuite/E25.py @@ -32,5 +32,6 @@ d[type(None)] = _deepcopy_atomic # Annotated Function Definitions #: Okay -def munge(input: AnyStr, sep: AnyStr = None, limit=1000) -> AnyStr: +def munge(input: AnyStr, sep: AnyStr = None, limit=1000, + extra: Union[str, dict] = None) -> AnyStr: pass |