Skip to content

Commit f430f31

Browse files
committed
remove unused push_char occurrences
1 parent 49078f3 commit f430f31

File tree

5 files changed

+1
-21
lines changed

5 files changed

+1
-21
lines changed

Lib/_pyrepl/console.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,6 @@ def get_event(self, block: bool = True) -> Event | None:
9898
completion of an event."""
9999
...
100100

101-
@abstractmethod
102-
def push_char(self, char: int | bytes) -> None:
103-
"""
104-
Push a character to the console event queue.
105-
"""
106-
...
107-
108101
@abstractmethod
109102
def beep(self) -> None: ...
110103

Lib/_pyrepl/reader.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -733,10 +733,6 @@ def handle1(self, block: bool = True) -> bool:
733733
self.do_cmd(cmd)
734734
return True
735735

736-
def push_char(self, char: int | bytes) -> None:
737-
self.console.push_char(char)
738-
self.handle1(block=False)
739-
740736
def readline(self, startup_hook: Callback | None = None) -> str:
741737
"""Read a line. The implementation of this method also shows
742738
how to drive Reader if you want more control over the event

Lib/_pyrepl/unix_console.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ def restore(self):
380380
signal.signal(signal.SIGWINCH, self.old_sigwinch)
381381
del self.old_sigwinch
382382

383-
def push_char(self, char: int | bytes) -> None:
383+
def push_char(self, char: bytes) -> None:
384384
"""
385385
Push a character to the console event queue.
386386
"""

Lib/_pyrepl/windows_console.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -481,12 +481,6 @@ def get_event(self, block: bool = True) -> Event | None:
481481
return Event(evt="key", data=key, raw=raw_key)
482482
return self.event_queue.get()
483483

484-
def push_char(self, char: int | bytes) -> None:
485-
"""
486-
Push a character to the console event queue.
487-
"""
488-
raise NotImplementedError("push_char not supported on Windows")
489-
490484
def beep(self) -> None:
491485
self.__write("\x07")
492486

Lib/test/test_pyrepl/support.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,6 @@ def move_cursor(self, x: int, y: int) -> None:
149149
def set_cursor_vis(self, visible: bool) -> None:
150150
pass
151151

152-
def push_char(self, char: int | bytes) -> None:
153-
pass
154-
155152
def beep(self) -> None:
156153
pass
157154

0 commit comments

Comments
 (0)