diff options
author | Anthony Sottile <asottile@umich.edu> | 2021-09-13 05:35:52 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-13 05:35:52 -0700 |
commit | 94af2a9ef804319f950d7feee7ba68e94991e317 (patch) | |
tree | 7e2bdb77f0ed12aaa8b5dc5b06a0254d3d5804f9 | |
parent | aa3417b6a51f5912e32d9c8c879e1b9dd660d5f8 (diff) | |
parent | e458011af828bda5d8c7e573fbefdd9d865b2334 (diff) | |
download | pep8-94af2a9ef804319f950d7feee7ba68e94991e317.tar.gz |
Merge pull request #1012 from Zac-HD/posonly-lambda-fix
Fix E225 for lambdas with all positional-only arguments
-rwxr-xr-x | pycodestyle.py | 4 | ||||
-rw-r--r-- | testsuite/python38.py | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/pycodestyle.py b/pycodestyle.py index 0d8ed50..ac584ce 100755 --- a/pycodestyle.py +++ b/pycodestyle.py @@ -933,7 +933,9 @@ def missing_whitespace_around_operator(logical_line, tokens): # ^ # def f(a, b, /): # ^ - prev_text == '/' and text in {',', ')'} or + # f = lambda a, /: + # ^ + prev_text == '/' and text in {',', ')', ':'} or # def f(a, b, /): # ^ prev_text == ')' and text == ':' diff --git a/testsuite/python38.py b/testsuite/python38.py index 57ee613..f927673 100644 --- a/testsuite/python38.py +++ b/testsuite/python38.py @@ -13,6 +13,9 @@ def f3( b, ): pass + + +lambda a, /: None #: Okay if x := 1: print(x) |