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