diff options
-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 fc02c00..705ba25 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)): |