Return whether a block of code is ready to execute, or should be continued Parameters ---------- code : string Python input code, which can be multiline. Returns ------- status : str One of 'complete', 'incomplete', or 'invali
(self, code: str)
| 3776 | runcode = run_code |
| 3777 | |
| 3778 | def check_complete(self, code: str) -> Tuple[str, str]: |
| 3779 | """Return whether a block of code is ready to execute, or should be continued |
| 3780 | |
| 3781 | Parameters |
| 3782 | ---------- |
| 3783 | code : string |
| 3784 | Python input code, which can be multiline. |
| 3785 | |
| 3786 | Returns |
| 3787 | ------- |
| 3788 | status : str |
| 3789 | One of 'complete', 'incomplete', or 'invalid' if source is not a |
| 3790 | prefix of valid code. |
| 3791 | indent : str |
| 3792 | When status is 'incomplete', this is some whitespace to insert on |
| 3793 | the next line of the prompt. |
| 3794 | """ |
| 3795 | status, nspaces = self.input_transformer_manager.check_complete(code) |
| 3796 | return status, ' ' * (nspaces or 0) |
| 3797 | |
| 3798 | #------------------------------------------------------------------------- |
| 3799 | # Things related to GUI support and pylab |
no outgoing calls
no test coverage detected