Skip to content

Commit 668524a

Browse files
committed
made suggested changes, after modifing local virtualenv no longer recieving mypy errors
1 parent e52cf86 commit 668524a

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

bpython/_internal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from .pager import page
55

66
# Ugly monkeypatching
7-
pydoc.pager = page
7+
pydoc.pager = page # type: ignore
88

99

1010
class _Helper:

bpython/pager.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@
3030
import subprocess
3131
import sys
3232
import shlex
33+
from typing import List
3334

3435

35-
def get_pager_command(default: str = "less -rf") -> list[str]:
36+
def get_pager_command(default: str = "less -rf") -> List[str]:
3637
command = shlex.split(os.environ.get("PAGER", default))
3738
return command
3839

@@ -53,6 +54,7 @@ def page(data: str, use_internal: bool = False) -> None:
5354
curses.endwin()
5455
try:
5556
popen = subprocess.Popen(command, stdin=subprocess.PIPE)
57+
assert popen.stdin is not None
5658
data_bytes = data.encode(sys.__stdout__.encoding, "replace")
5759
popen.stdin.write(data_bytes)
5860
popen.stdin.close()

0 commit comments

Comments
 (0)