eric6/Plugins/CheckerPlugins/CodeStyleChecker/Simplify/SimplifyChecker.py

changeset 8191
9125da0c227e
parent 8189
17df5c8df8c1
child 8192
e1157bd8b4c2
diff -r 17df5c8df8c1 -r 9125da0c227e eric6/Plugins/CheckerPlugins/CodeStyleChecker/Simplify/SimplifyChecker.py
--- a/eric6/Plugins/CheckerPlugins/CodeStyleChecker/Simplify/SimplifyChecker.py	Thu Apr 01 19:48:36 2021 +0200
+++ b/eric6/Plugins/CheckerPlugins/CodeStyleChecker/Simplify/SimplifyChecker.py	Fri Apr 02 15:35:44 2021 +0200
@@ -20,7 +20,7 @@
     Codes = [
         # Python-specifics
         "Y101", "Y102", "Y103", "Y104", "Y105", "Y106", "Y107", "Y108",
-        "Y109", "Y110", "Y111", "Y112",
+        "Y109", "Y110", "Y111", "Y112", "Y113", "Y114", "Y115", "Y116",
         
         # Comparations
     ]
@@ -149,5 +149,10 @@
             self.__reportInvalidSyntax()
             return
         
+        # Add parent information
+        for node in ast.walk(self.__tree):
+            for child in ast.iter_child_nodes(node):
+                child.parent = node  # type: ignore
+        
         visitor = SimplifyNodeVisitor(self.__error)
         visitor.visit(self.__tree)

eric ide

mercurial