diff options
author | Anthony Sottile <asottile@umich.edu> | 2020-03-24 14:44:57 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-24 14:44:57 -0700 |
commit | 0e0b95883313b53d377c2df51349bf10d9571cfb (patch) | |
tree | a6032b4381c86815021cb863cb59e88a3809982e /pycodestyle.py | |
parent | a9e8ebcf821b99c7587cc0b566396fc3f1c9d81b (diff) | |
parent | e7abf262b6ffb992bf53bb8e33e213d77928d64a (diff) | |
download | pep8-0e0b95883313b53d377c2df51349bf10d9571cfb.tar.gz |
Merge pull request #918 from asottile/only_positional
Fix E225 for PEP 570 all positional-only arguments
Diffstat (limited to 'pycodestyle.py')
-rwxr-xr-x | pycodestyle.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/pycodestyle.py b/pycodestyle.py index d2e9337..b6a22f3 100755 --- a/pycodestyle.py +++ b/pycodestyle.py @@ -863,7 +863,16 @@ def missing_whitespace_around_operator(logical_line, tokens): # Tolerate the "<>" operator, even if running Python 3 # Deal with Python 3's annotated return value "->" pass - elif prev_text == '/' and text == ',': + elif ( + # def f(a, /, b): + # ^ + # def f(a, b, /): + # ^ + prev_text == '/' and text in {',', ')'} or + # def f(a, b, /): + # ^ + prev_text == ')' and text == ':' + ): # Tolerate the "/" operator in function definition # For more info see PEP570 pass |