(self)
| 42 | self.generic_visit(node) |
| 43 | |
| 44 | def run(self): |
| 45 | self.root = ast.parse(self.code) |
| 46 | self.only_func = True |
| 47 | for statement in self.root.body: |
| 48 | if not isinstance(statement, ast.FunctionDef) and not isinstance(statement, ast.ClassDef): |
| 49 | self.only_func = False |
| 50 | break |
| 51 | self.visit(self.root) |
| 52 | |
| 53 | if len(self.classes) > 0 and len(self.func_names) > 0: |
| 54 | self.all_func_in_class = True |
| 55 | for f in self.func_names: |
| 56 | if f.split("@")[-1] == "global": |
| 57 | self.all_func_in_class = False |
| 58 | break |
| 59 | |
| 60 | class PlaceHolder(ast.NodeTransformer): |
| 61 | def __init__(self): |
no outgoing calls
no test coverage detected