src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Miscellaneous/MiscellaneousChecker.py

branch
eric7
changeset 10170
6cf1ee737d8f
parent 10169
0f70a4ef4592
child 10175
57ed3cb66e9a
equal deleted inserted replaced
10169:0f70a4ef4592 10170:6cf1ee737d8f
2618 isinstance(expr, ast.Attribute) and expr.attr == "overload" 2618 isinstance(expr, ast.Attribute) and expr.attr == "overload"
2619 ) 2619 )
2620 2620
2621 def emptyBody(body): 2621 def emptyBody(body):
2622 def isStrOrEllipsis(node): 2622 def isStrOrEllipsis(node):
2623 return ( 2623 return isinstance(node, ast.Constant) and (
2624 isinstance(node, ast.Constant) 2624 node.value is Ellipsis or isinstance(node.value, str)
2625 and (node.value is Ellipsis or isinstance(node.value, str))
2626 ) 2625 )
2627 2626
2628 # Function body consist solely of `pass`, `...`, and/or (doc)string literals 2627 # Function body consist solely of `pass`, `...`, and/or (doc)string literals
2629 return all( 2628 return all(
2630 isinstance(stmt, ast.Pass) 2629 isinstance(stmt, ast.Pass)

eric ide

mercurial