diff options
author | Ian Lee <IanLee1521@gmail.com> | 2014-12-18 23:34:57 -0800 |
---|---|---|
committer | Ian Lee <IanLee1521@gmail.com> | 2014-12-29 10:39:33 -0800 |
commit | 4f848e5018e9994a4562b13a0b3ea96b9bade0bf (patch) | |
tree | bde1886fb96ea77e76de10574e2e6afd9542d830 | |
parent | eaf09d1ae4a92bd0982b5757f2872d0583f7a3d3 (diff) | |
download | pep8-4f848e5018e9994a4562b13a0b3ea96b9bade0bf.tar.gz |
Update tests for issue #357
-rwxr-xr-x | pep8.py | 4 | ||||
-rw-r--r-- | testsuite/E25.py | 5 |
2 files changed, 8 insertions, 1 deletions
@@ -755,7 +755,6 @@ def whitespace_around_named_parameter_equals(logical_line, tokens): Okay: boolean(a <= b) Okay: boolean(a >= b) Okay: def foo(arg: int = 42): - Okay: def f(x: int, y=15, z: float = 0.123) -> list: E251: def complex(real, imag = 0.0): E251: return magic(r = real, i = imag) @@ -786,6 +785,9 @@ def whitespace_around_named_parameter_equals(logical_line, tokens): no_space = True if start != prev_end: yield (prev_end, message) + if not parens: + annotated_func_arg = False + prev_end = end diff --git a/testsuite/E25.py b/testsuite/E25.py index 9b7ff69..ad8db88 100644 --- a/testsuite/E25.py +++ b/testsuite/E25.py @@ -29,3 +29,8 @@ foo(bar=(1 >= 1)) foo(bar=(1 <= 1)) (options, args) = parser.parse_args() d[type(None)] = _deepcopy_atomic + +# Annotated Function Definitions +#: Okay +def munge(input: AnyStr, sep: AnyStr = None, limit=1000) -> AnyStr: + pass |