summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Sottile <asottile@umich.edu>2020-02-19 13:16:07 -0800
committerGitHub <noreply@github.com>2020-02-19 13:16:07 -0800
commit2796890df300c4b12b07e6594ec864afe48d26fc (patch)
treef66f27f8d574e8fa85b91eb317311b8f8883c4e2
parentd69c15eb7ecf77e94988fb55207a78936b48079c (diff)
parentad86a1b818eee307c9fd558c9d7948f20d6fef71 (diff)
downloadpep8-2796890df300c4b12b07e6594ec864afe48d26fc.tar.gz
Merge pull request #897 from sobolevn/issue-768
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 b7e0b2f..705ba25 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)