src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Simplify/SimplifyNodeVisitor.py

branch
eric7
changeset 10050
3750abc45d5e
parent 10047
cc9ead6d1c46
child 10116
4a619fb7bd09
--- a/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Simplify/SimplifyNodeVisitor.py	Mon May 22 08:46:00 2023 +0200
+++ b/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Simplify/SimplifyNodeVisitor.py	Mon May 22 09:07:37 2023 +0200
@@ -1899,13 +1899,12 @@
         @param node reference to the AST node to be checked
         @type ast.Call
         """
-        errors = []
         if not (
             isinstance(node.func, ast.Attribute)
             and node.func.attr == "get"
             and isinstance(node.func.ctx, ast.Load)
         ):
-            return errors
+            return
 
         # check the argument value
         if not (
@@ -1913,7 +1912,7 @@
             and isinstance(node.args[1], BOOL_CONST_TYPES)
             and node.args[1].value is None
         ):
-            return errors
+            return
 
         actual = unparse(node)
         func = unparse(node.func)
@@ -1921,5 +1920,6 @@
         expected = f"{func}({key})"
         self.__error(node.lineno - 1, node.col_offset, "Y910", expected, actual)
 
+
 #
 # eflag: noqa = M891

eric ide

mercurial