diff options
author | Steven Myint <git@stevenmyint.com> | 2015-12-22 05:35:02 -0800 |
---|---|---|
committer | Steven Myint <git@stevenmyint.com> | 2015-12-22 05:35:02 -0800 |
commit | 9a2698d817121d1d74f90f6f8f88973c9a7d22cd (patch) | |
tree | 0c85c6db09b4b4be8b209b76146f2310a64e06fc | |
parent | 8d80642a76e16af6a8756a21b9ef9ec9a4b32108 (diff) | |
parent | e8a5c67b23678d778982a202ee0c46513e584b05 (diff) | |
download | pyflakes-9a2698d817121d1d74f90f6f8f88973c9a7d22cd.tar.gz |
Merge pull request #56 from pyflakes/matmul
Handle matrix-multiplication operator ("@")
-rw-r--r-- | pyflakes/checker.py | 3 | ||||
-rw-r--r-- | pyflakes/test/test_other.py | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/pyflakes/checker.py b/pyflakes/checker.py index fe20146..7155b54 100644 --- a/pyflakes/checker.py +++ b/pyflakes/checker.py @@ -767,7 +767,8 @@ class Checker(object): # same for operators AND = OR = ADD = SUB = MULT = DIV = MOD = POW = LSHIFT = RSHIFT = \ BITOR = BITXOR = BITAND = FLOORDIV = INVERT = NOT = UADD = USUB = \ - EQ = NOTEQ = LT = LTE = GT = GTE = IS = ISNOT = IN = NOTIN = ignore + EQ = NOTEQ = LT = LTE = GT = GTE = IS = ISNOT = IN = NOTIN = \ + MATMULT = ignore # additional node types COMPREHENSION = KEYWORD = FORMATTEDVALUE = handleChildren diff --git a/pyflakes/test/test_other.py b/pyflakes/test/test_other.py index 0ac96a3..ae6cea2 100644 --- a/pyflakes/test/test_other.py +++ b/pyflakes/test/test_other.py @@ -1736,3 +1736,10 @@ class TestAsyncStatements(TestCase): ... await trans.end() ''') + + @skipIf(version_info < (3, 5), 'new in Python 3.5') + def test_matmul(self): + self.flakes(''' + def foo(a, b): + return a @ b + ''') |