Get register_module call of the python source file. Args: ast (NodeVisitor): The ast node. Examples: >>> with open(source_file_path, "rb") as f: >>> src = f.read() >>> analyzer = AnalysisSourceFileRegisterModules(source_file_path) >>> an
| 369 | |
| 370 | |
| 371 | class AnalysisSourceFileRegisterModules(ast.NodeVisitor): |
| 372 | """Get register_module call of the python source file. |
| 373 | |
| 374 | |
| 375 | Args: |
| 376 | ast (NodeVisitor): The ast node. |
| 377 | |
| 378 | Examples: |
| 379 | >>> with open(source_file_path, "rb") as f: |
| 380 | >>> src = f.read() |
| 381 | >>> analyzer = AnalysisSourceFileRegisterModules(source_file_path) |
| 382 | >>> analyzer.visit(ast.parse(src, filename=source_file_path)) |
| 383 | """ |
| 384 | |
| 385 | def __init__(self, source_file_path, class_name) -> None: |
| 386 | super().__init__() |
| 387 | self.source_file_path = source_file_path |
| 388 | self.class_name = class_name |
| 389 | self.class_define = None |
| 390 | |
| 391 | def visit_ClassDef(self, node: ast.ClassDef): |
| 392 | if node.name == self.class_name: |
| 393 | self.class_define = node |
| 394 | |
| 395 | |
| 396 | def get_pipeline_input_parameters( |
no outgoing calls
no test coverage detected
searching dependent graphs…