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

changeset 8241
de2ebf20d822
parent 8219
013aee248a62
child 8242
aa713ac50c0d
equal deleted inserted replaced
8240:93b8a353c4bf 8241:de2ebf20d822
540 not isinstance(node.handlers[0].body[0], ast.Pass) or 540 not isinstance(node.handlers[0].body[0], ast.Pass) or
541 node.orelse != [] 541 node.orelse != []
542 ): 542 ):
543 if node.handlers[0].type is None: 543 if node.handlers[0].type is None:
544 exception = "Exception" 544 exception = "Exception"
545 elif isinstance(node.handlers[0].type, ast.Tuple):
546 exception = ", ".join(
547 [unparse(n) for n in node.handlers[0].type.elts])
545 else: 548 else:
546 exception = unparse(node.handlers[0].type) 549 exception = unparse(node.handlers[0].type)
547 self.__error(node.lineno - 1, node.col_offset, "Y105", exception) 550 self.__error(node.lineno - 1, node.col_offset, "Y105", exception)
548 551
549 def __check106(self, node): 552 def __check106(self, node):

eric ide

mercurial