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