Skip to content

Commit 0d16fe6

Browse files
committed
Add type annotations
1 parent 28ea475 commit 0d16fe6

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

bpython/curtsiesfrontend/repl.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ def __init__(
388388
self._current_line = ""
389389

390390
# current line of output - stdout and stdin go here
391-
self.current_stdouterr_line = "" # Union[str, FmtStr]
391+
self.current_stdouterr_line: Union[str, FmtStr] = ""
392392

393393
# this is every line that's been displayed (input and output)
394394
# as with formatting applied. Logical lines that exceeded the terminal width
@@ -657,8 +657,7 @@ def process_event(self, e: Union[events.Event, str]) -> Optional[bool]:
657657
self.process_key_event(e)
658658
return None
659659

660-
def process_control_event(self, e) -> Optional[bool]:
661-
660+
def process_control_event(self, e: events.Event) -> Optional[bool]:
662661
if isinstance(e, bpythonevents.ScheduledRefreshRequestEvent):
663662
# This is a scheduled refresh - it's really just a refresh (so nop)
664663
pass
@@ -703,9 +702,9 @@ def process_control_event(self, e) -> Optional[bool]:
703702
elif isinstance(e, bpythonevents.RunStartupFileEvent):
704703
try:
705704
self.startup()
706-
except OSError as e:
705+
except OSError as err:
707706
self.status_bar.message(
708-
_("Executing PYTHONSTARTUP failed: %s") % (e,)
707+
_("Executing PYTHONSTARTUP failed: %s") % (err,)
709708
)
710709

711710
elif isinstance(e, bpythonevents.UndoEvent):

0 commit comments

Comments
 (0)