File tree 2 files changed +4
-2
lines changed 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 4
4
from .pager import page
5
5
6
6
# Ugly monkeypatching
7
- pydoc .pager = page
7
+ pydoc .pager = page # type: ignore
8
8
9
9
10
10
class _Helper :
Original file line number Diff line number Diff line change 30
30
import subprocess
31
31
import sys
32
32
import shlex
33
+ from typing import List
33
34
34
35
35
- def get_pager_command (default : str = "less -rf" ) -> list [str ]:
36
+ def get_pager_command (default : str = "less -rf" ) -> List [str ]:
36
37
command = shlex .split (os .environ .get ("PAGER" , default ))
37
38
return command
38
39
@@ -53,6 +54,7 @@ def page(data: str, use_internal: bool = False) -> None:
53
54
curses .endwin ()
54
55
try :
55
56
popen = subprocess .Popen (command , stdin = subprocess .PIPE )
57
+ assert popen .stdin is not None
56
58
data_bytes = data .encode (sys .__stdout__ .encoding , "replace" )
57
59
popen .stdin .write (data_bytes )
58
60
popen .stdin .close ()
You can’t perform that action at this time.
0 commit comments