(statement: str)
| 116 | input_n = 0 |
| 117 | |
| 118 | def maybe_run_command(statement: str) -> bool: |
| 119 | statement = statement.strip() |
| 120 | if statement in console.locals or statement not in REPL_COMMANDS: |
| 121 | return False |
| 122 | |
| 123 | reader = _get_reader() |
| 124 | reader.history.pop() # skip internal commands in history |
| 125 | command = REPL_COMMANDS[statement] |
| 126 | if callable(command): |
| 127 | # Make sure that history does not change because of commands |
| 128 | with reader.suspend_history(): |
| 129 | command() |
| 130 | return True |
| 131 | return False |
| 132 | |
| 133 | while 1: |
| 134 | try: |
no test coverage detected