summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsobolevn <mail@sobolevn.me>2019-12-05 12:33:18 +0300
committersobolevn <mail@sobolevn.me>2019-12-05 12:33:18 +0300
commitad86a1b818eee307c9fd558c9d7948f20d6fef71 (patch)
tree43757b1cc68ec68ea869a33fa31722874b1d1fc5
parentd219c684f117be77927d33146e76a5364161e518 (diff)
downloadpep8-ad86a1b818eee307c9fd558c9d7948f20d6fef71.tar.gz
Adds matmul operator support, fixes #768
-rwxr-xr-xpycodestyle.py2
-rw-r--r--testsuite/E22.py5
2 files changed, 6 insertions, 1 deletions
diff --git a/pycodestyle.py b/pycodestyle.py
index 6d3b554..fc02c00 100755
--- a/pycodestyle.py
+++ b/pycodestyle.py
@@ -113,7 +113,7 @@ PyCF_ONLY_AST = 1024
SINGLETONS = frozenset(['False', 'None', 'True'])
KEYWORDS = frozenset(keyword.kwlist + ['print', 'async']) - SINGLETONS
UNARY_OPERATORS = frozenset(['>>', '**', '*', '+', '-'])
-ARITHMETIC_OP = frozenset(['**', '*', '/', '//', '+', '-'])
+ARITHMETIC_OP = frozenset(['**', '*', '/', '//', '+', '-', '@'])
WS_OPTIONAL_OPERATORS = ARITHMETIC_OP.union(['^', '&', '|', '<<', '>>', '%'])
# Warn for -> function annotation operator in py3.5+ (issue 803)
FUNCTION_RETURN_ANNOTATION_OP = ['->'] if sys.version_info >= (3, 5) else []
diff --git a/testsuite/E22.py b/testsuite/E22.py
index 4974cb3..7ea2792 100644
--- a/testsuite/E22.py
+++ b/testsuite/E22.py
@@ -84,6 +84,10 @@ i = 1or 0
1is 1
#: E225
1in []
+#: E225
+i = 1 @2
+#: E225
+i = 1@ 2
#: E225 E226
i=i+1
#: E225 E226
@@ -150,6 +154,7 @@ if not -5 < x < +5:
print >>sys.stderr, "x is out of range."
print >> sys.stdout, "x is an integer."
x = x / 2 - 1
+x = 1 @ 2
if alpha[:-i]:
*a, b = (1, 2, 3)