summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorJimmy Jia <tesrin@gmail.com>2018-04-18 23:28:35 -0400
committerIan Stapleton Cordasco <graffatcolmingov@gmail.com>2018-04-18 22:28:35 -0500
commit17baca469a221da6b8c1531d13cfd33cb6eceed3 (patch)
treea78e3e467e460c1786f1176374560c5a03d08434 /testsuite
parentd8f10a90e7ec93221d03b414b105f9514c469ad2 (diff)
downloadpep8-17baca469a221da6b8c1531d13cfd33cb6eceed3.tar.gz
Fix detection of annotated argument defaults
This improves E252 to allow default arguments like `_default(f=1)`. Closes gh-753
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/E25.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/testsuite/E25.py b/testsuite/E25.py
index 55ed438..8898157 100644
--- a/testsuite/E25.py
+++ b/testsuite/E25.py
@@ -45,3 +45,6 @@ async def add(a: int = 0, b: int = 0) -> int:
#: E252:1:15 E252:1:16 E252:1:27 E252:1:36
def add(a: int=0, b: int =0, c: int= 0) -> int:
return a + b + c
+#: Okay
+def add(a: int = _default(name='f')):
+ return a