Sat, 10 Apr 2021 17:54:58 +0200
Simplify Checker: fixed an issue in check 122.
diff -r fc5d68a6889e -r 6a042a54e0f7 eric6/Plugins/CheckerPlugins/CodeStyleChecker/Simplify/SimplifyChecker.py --- a/eric6/Plugins/CheckerPlugins/CodeStyleChecker/Simplify/SimplifyChecker.py Sat Apr 10 16:13:22 2021 +0200 +++ b/eric6/Plugins/CheckerPlugins/CodeStyleChecker/Simplify/SimplifyChecker.py Sat Apr 10 17:54:58 2021 +0200 @@ -24,7 +24,7 @@ "Y117", "Y118", "Y119", "Y120", "Y121", "Y122", # Python-specifics not part of flake8-simplify - "Y181", "Y182", + "Y181", "Y182", # Comparations "Y201", "Y202", "Y203", "Y204", "Y205", "Y206", "Y207", "Y208",
diff -r fc5d68a6889e -r 6a042a54e0f7 eric6/Plugins/CheckerPlugins/CodeStyleChecker/Simplify/SimplifyNodeVisitor.py --- a/eric6/Plugins/CheckerPlugins/CodeStyleChecker/Simplify/SimplifyNodeVisitor.py Sat Apr 10 16:13:22 2021 +0200 +++ b/eric6/Plugins/CheckerPlugins/CodeStyleChecker/Simplify/SimplifyNodeVisitor.py Sat Apr 10 17:54:58 2021 +0200 @@ -1122,7 +1122,10 @@ isinstance(node.body[0], ast.Assign) and isinstance(node.body[0].value, ast.Subscript) and len(node.body[0].targets) == 1 and - isinstance(node.body[0].targets[0], ast.Name) + isinstance(node.body[0].targets[0], ast.Name) and + isinstance(node.body[0].value.value, ast.Name) and + isinstance(node.test.comparators[0], ast.Name) and + node.body[0].value.value.id == node.test.comparators[0].id ): key = unparse(node.test.left) dictname = unparse(node.test.comparators[0])