Skip to content

Commit

Permalink
Merge pull request #1161 from PyCQA/legacy-not-equals
Browse files Browse the repository at this point in the history
remove python 2.x handling of <> and -> operators
  • Loading branch information
asottile committed Jul 15, 2023
2 parents 8c79b21 + 19b55a9 commit ece0b4c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions pycodestyle.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
ARITHMETIC_OP = frozenset(['**', '*', '/', '//', '+', '-', '@'])
WS_OPTIONAL_OPERATORS = ARITHMETIC_OP.union(['^', '&', '|', '<<', '>>', '%'])
WS_NEEDED_OPERATORS = frozenset([
'**=', '*=', '/=', '//=', '+=', '-=', '!=', '<>', '<', '>',
'**=', '*=', '/=', '//=', '+=', '-=', '!=', '<', '>',
'%=', '^=', '&=', '|=', '==', '<=', '>=', '<<=', '>>=', '=',
'and', 'in', 'is', 'or', '->', ':='])
WHITESPACE = frozenset(' \t\xa0')
Expand Down Expand Up @@ -905,10 +905,6 @@ def missing_whitespace_around_operator(logical_line, tokens):
yield (need_space[0],
"E225 missing whitespace around operator")
need_space = False
elif text == '>' and prev_text in ('<', '-'):
# Tolerate the "<>" operator, even if running Python 3
# Deal with Python 3's annotated return value "->"
pass
elif (
# def f(a, /, b):
# ^
Expand Down

0 comments on commit ece0b4c

Please sign in to comment.