|
30 | 30 | import bpython.curtsiesfrontend.replpainter as paint |
31 | 31 | import curtsies.events as events |
32 | 32 | from bpython.curtsiesfrontend.friendly import NotImplementedError |
33 | | -from bpython.curtsiesfrontend.coderunner import CodeRunner, FakeOutput |
| 33 | +from bpython.curtsiesfrontend.coderunner import CodeRunner, FakeOutput, Unfinished |
34 | 34 |
|
35 | 35 | #TODO figure out how config.list_win_visible behaves and implement it, or stop using it |
36 | 36 | #TODO other autocomplete modes (also fix in other bpython implementations) |
@@ -206,7 +206,7 @@ def smarter_request_refresh(): |
206 | 206 | self.cursor_offset_in_line = 0 # from the left, 0 means first char |
207 | 207 | self.done = True # whether the current block is finished yet |
208 | 208 |
|
209 | | - self.coderunner = CodeRunner(self.interp, request_refresh) |
| 209 | + self.coderunner = CodeRunner(self.interp, self.request_refresh) |
210 | 210 | self.stdout = FakeOutput(self.coderunner, self.send_to_stdout) |
211 | 211 | self.stderr = FakeOutput(self.coderunner, self.send_to_stderr) |
212 | 212 | self.stdin = FakeStdin(self.coderunner, self) |
@@ -513,7 +513,7 @@ def run_code_and_maybe_finish(self, for_code=None): |
513 | 513 | if r: |
514 | 514 | logging.debug("----- Running finish command stuff -----") |
515 | 515 | logging.debug("saved_indent: %r", self.saved_indent) |
516 | | - unfinished = r == 'unfinished' |
| 516 | + unfinished = r == Unfinished |
517 | 517 | err = self.saved_predicted_parse_error |
518 | 518 | self.saved_predicted_parse_error = False |
519 | 519 |
|
|
0 commit comments