From b34b79664ccec08ea419aa44037c1b0d2815611b Mon Sep 17 00:00:00 2001 From: Nikita S Date: Tue, 2 Jul 2019 01:59:10 +0300 Subject: [PATCH 1/4] Added support for PEP 570 (#867) --- pycodestyle.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pycodestyle.py b/pycodestyle.py index ec6b894d..0c043fcd 100755 --- a/pycodestyle.py +++ b/pycodestyle.py @@ -855,6 +855,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 PEP570source + pass else: if need_space is True or need_space[1]: # A needed trailing space was not found From 9bf58dfc227ac98006bb22c4a570f98e8a0713e0 Mon Sep 17 00:00:00 2001 From: Nikita Serba Date: Wed, 22 Jan 2020 20:17:36 +0200 Subject: [PATCH 2/4] Create python38 --- testsuite/python38 | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 testsuite/python38 diff --git a/testsuite/python38 b/testsuite/python38 new file mode 100644 index 00000000..adf217dc --- /dev/null +++ b/testsuite/python38 @@ -0,0 +1,3 @@ +#: Okay +def f(a, /, b): + pass From ce2fcd3cd4cebdf7eb320d037695883cd046b96f Mon Sep 17 00:00:00 2001 From: Nikita Serba Date: Wed, 22 Jan 2020 20:21:49 +0200 Subject: [PATCH 3/4] Typo fix (rename python38 to python38.py) --- testsuite/{python38 => python38.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename testsuite/{python38 => python38.py} (100%) diff --git a/testsuite/python38 b/testsuite/python38.py similarity index 100% rename from testsuite/python38 rename to testsuite/python38.py From 2f0ca0b42660d7a6ee239f3a372a8783ad20c37a Mon Sep 17 00:00:00 2001 From: Nikita Serba Date: Wed, 22 Jan 2020 20:22:25 +0200 Subject: [PATCH 4/4] Update pycodestyle.py Co-Authored-By: Anthony Sottile --- pycodestyle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pycodestyle.py b/pycodestyle.py index 0c043fcd..7b5b4f8e 100755 --- a/pycodestyle.py +++ b/pycodestyle.py @@ -857,7 +857,7 @@ def missing_whitespace_around_operator(logical_line, tokens): pass elif prev_text == '/' and text == ',': # Tolerate the "/" operator in function definition - # For more info see PEP570source + # For more info see PEP570 pass else: if need_space is True or need_space[1]: