diff options
author | Ian Stapleton Cordasco <graffatcolmingov@gmail.com> | 2020-01-30 16:47:30 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-30 16:47:30 -0600 |
commit | d69c15eb7ecf77e94988fb55207a78936b48079c (patch) | |
tree | 5d2d5d421edd7872f5d8f4d4b63542e8cce9186f | |
parent | d219c684f117be77927d33146e76a5364161e518 (diff) | |
parent | 2c29cc4f4f08906b111e306e6e806b5af628fbbd (diff) | |
download | pep8-d69c15eb7ecf77e94988fb55207a78936b48079c.tar.gz |
Merge pull request #872 from Nekit10/master
Added support for PEP 570 (#867)
-rwxr-xr-x | pycodestyle.py | 4 | ||||
-rw-r--r-- | testsuite/python38.py | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/pycodestyle.py b/pycodestyle.py index 6d3b554..b7e0b2f 100755 --- a/pycodestyle.py +++ b/pycodestyle.py @@ -860,6 +860,10 @@ 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 == ',': + # Tolerate the "/" operator in function definition + # For more info see PEP570 + pass else: if need_space is True or need_space[1]: # A needed trailing space was not found diff --git a/testsuite/python38.py b/testsuite/python38.py index 59addad..5f62a3f 100644 --- a/testsuite/python38.py +++ b/testsuite/python38.py @@ -1,4 +1,7 @@ #: Okay +def f(a, /, b): + pass +#: Okay if x := 1: print(x) if m and (token := m.group(1)): |