diff options
author | Anthony Sottile <asottile@umich.edu> | 2020-03-23 10:01:28 -0700 |
---|---|---|
committer | Anthony Sottile <asottile@umich.edu> | 2020-03-23 10:02:44 -0700 |
commit | e7abf262b6ffb992bf53bb8e33e213d77928d64a (patch) | |
tree | d5ebb57f165a7be7e2d008da8e6b266c443e578a /pycodestyle.py | |
parent | 19a3925a89c71d422b98363d9ccfa8903a65b707 (diff) | |
download | pep8-e7abf262b6ffb992bf53bb8e33e213d77928d64a.tar.gz |
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 235532c..7629429 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 |