Skip to content

Commit 68bee30

Browse files
committed
Fix override
1 parent 290efc6 commit 68bee30

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

bpython/curtsiesfrontend/repl.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1250,7 +1250,7 @@ def predicted_indent(self, line):
12501250
logger.debug("indent we found was %s", indent)
12511251
return indent
12521252

1253-
def push(self, line, insert_into_history=True):
1253+
def push(self, line, insert_into_history=True) -> bool:
12541254
"""Push a line of code onto the buffer, start running the buffer
12551255
12561256
If the interpreter successfully runs the code, clear the buffer
@@ -1297,6 +1297,7 @@ def push(self, line, insert_into_history=True):
12971297

12981298
self.coderunner.load_code(code_to_run)
12991299
self.run_code_and_maybe_finish()
1300+
return not code_will_parse
13001301

13011302
def run_code_and_maybe_finish(self, for_code=None):
13021303
r = self.coderunner.run_code(for_code=for_code)

bpython/repl.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -989,11 +989,11 @@ def do_pastebin(self, s) -> str | None:
989989

990990
return paste_url
991991

992-
def push(self, s, insert_into_history=True) -> bool:
992+
def push(self, line, insert_into_history=True) -> bool:
993993
"""Push a line of code onto the buffer so it can process it all
994994
at once when a code block ends"""
995995
# This push method is used by cli and urwid, but not curtsies
996-
s = s.rstrip("\n")
996+
s = line.rstrip("\n")
997997
self.buffer.append(s)
998998

999999
if insert_into_history:

0 commit comments

Comments
 (0)