summaryrefslogtreecommitdiffstats
path: root/Lib/lib2to3/fixes/fix_ne.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/lib2to3/fixes/fix_ne.py')
-rw-r--r--Lib/lib2to3/fixes/fix_ne.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/lib2to3/fixes/fix_ne.py b/Lib/lib2to3/fixes/fix_ne.py
index 1472036..e3ee10f 100644
--- a/Lib/lib2to3/fixes/fix_ne.py
+++ b/Lib/lib2to3/fixes/fix_ne.py
@@ -12,9 +12,11 @@ from .. import fixer_base
class FixNe(fixer_base.BaseFix):
# This is so simple that we don't need the pattern compiler.
+ _accept_type = token.NOTEQUAL
+
def match(self, node):
# Override
- return node.type == token.NOTEQUAL and node.value == "<>"
+ return node.value == "<>"
def transform(self, node, results):
new = pytree.Leaf(token.NOTEQUAL, "!=", prefix=node.prefix)