Skip to content

Commit 4f848e5

Browse files
committed
Update tests for issue #357
1 parent eaf09d1 commit 4f848e5

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

pep8.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,6 @@ def whitespace_around_named_parameter_equals(logical_line, tokens):
755755
Okay: boolean(a <= b)
756756
Okay: boolean(a >= b)
757757
Okay: def foo(arg: int = 42):
758-
Okay: def f(x: int, y=15, z: float = 0.123) -> list:
759758
760759
E251: def complex(real, imag = 0.0):
761760
E251: return magic(r = real, i = imag)
@@ -786,6 +785,9 @@ def whitespace_around_named_parameter_equals(logical_line, tokens):
786785
no_space = True
787786
if start != prev_end:
788787
yield (prev_end, message)
788+
if not parens:
789+
annotated_func_arg = False
790+
789791
prev_end = end
790792

791793

testsuite/E25.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,8 @@ def foo(bar = False):
2929
foo(bar=(1 <= 1))
3030
(options, args) = parser.parse_args()
3131
d[type(None)] = _deepcopy_atomic
32+
33+
# Annotated Function Definitions
34+
#: Okay
35+
def munge(input: AnyStr, sep: AnyStr = None, limit=1000) -> AnyStr:
36+
pass

0 commit comments

Comments
 (0)