(self, frame: Frame)
| 582 | self.outdent() |
| 583 | |
| 584 | def enter_frame(self, frame: Frame) -> None: |
| 585 | undefs = [] |
| 586 | for target, (action, param) in frame.symbols.loads.items(): |
| 587 | if action == VAR_LOAD_PARAMETER: |
| 588 | pass |
| 589 | elif action == VAR_LOAD_RESOLVE: |
| 590 | self.writeline(f"{target} = {self.get_resolve_func()}({param!r})") |
| 591 | elif action == VAR_LOAD_ALIAS: |
| 592 | self.writeline(f"{target} = {param}") |
| 593 | elif action == VAR_LOAD_UNDEFINED: |
| 594 | undefs.append(target) |
| 595 | else: |
| 596 | raise NotImplementedError("unknown load instruction") |
| 597 | if undefs: |
| 598 | self.writeline(f"{' = '.join(undefs)} = missing") |
| 599 | |
| 600 | def leave_frame(self, frame: Frame, with_python_scope: bool = False) -> None: |
| 601 | if not with_python_scope: |
no test coverage detected