SimplifyNodeVisitor: fixed an issue causing some try: except: pass constructs not being detected by Y105.

Thu, 15 Apr 2021 16:52:05 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Thu, 15 Apr 2021 16:52:05 +0200
changeset 8242
aa713ac50c0d
parent 8241
de2ebf20d822
child 8243
cc717c2ae956

SimplifyNodeVisitor: fixed an issue causing some try: except: pass constructs not being detected by Y105.

eric6/Plugins/CheckerPlugins/CodeStyleChecker/Simplify/SimplifyNodeVisitor.py file | annotate | diff | comparison | revisions
--- a/eric6/Plugins/CheckerPlugins/CodeStyleChecker/Simplify/SimplifyNodeVisitor.py	Thu Apr 15 16:50:23 2021 +0200
+++ b/eric6/Plugins/CheckerPlugins/CodeStyleChecker/Simplify/SimplifyNodeVisitor.py	Thu Apr 15 16:52:05 2021 +0200
@@ -533,7 +533,6 @@
         # except ValueError:
         #     pass
         if not (
-            len(node.body) != 1 or
             len(node.handlers) != 1 or
             not isinstance(node.handlers[0], ast.ExceptHandler) or
             len(node.handlers[0].body) != 1 or

eric ide

mercurial