diff --git a/pycodestyle.py b/pycodestyle.py index 6d3b554c..b7e0b2fb 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 59addad4..5f62a3f1 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)):