Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for PEP 570 (#867) #872

Merged
merged 5 commits into from
Jan 30, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions pycodestyle.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
sandsbit marked this conversation as resolved.
Show resolved Hide resolved
pass
else:
if need_space is True or need_space[1]:
# A needed trailing space was not found
Expand Down
3 changes: 3 additions & 0 deletions testsuite/python38
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#: Okay
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs to be python38.py

def f(a, /, b):
pass