We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8664e18 + 18b12f0 commit 4fb305eCopy full SHA for 4fb305e
pep8.py
@@ -1017,13 +1017,14 @@ def break_around_binary_operator(logical_line, tokens):
1017
Okay: x = '''\n''' + ''
1018
Okay: foo(x,\n -y)
1019
Okay: foo(x, # comment\n -y)
1020
+ Okay: var = (1 &\n ~2)
1021
"""
1022
def is_binary_operator(token_type, text):
1023
# The % character is strictly speaking a binary operator, but the
1024
# common usage seems to be to put it next to the format parameters,
1025
# after a line break.
1026
return ((token_type == tokenize.OP or text in ['and', 'or']) and
- text not in "()[]{},:.;@=%")
1027
+ text not in "()[]{},:.;@=%~")
1028
1029
line_break = False
1030
unary_context = True
0 commit comments