Skip to content

Commit 0234e2a

Browse files
committed
lsp.py: Fix broken console reading
1 parent ca3af4b commit 0234e2a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/lsp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,15 @@ def escape_string(text: str) -> str:
4141
}))
4242

4343

44-
def getCharFromStdin():
44+
def getCharFromStdin() -> str:
4545
"""
4646
Gets a single character from stdin without line-buffering.
4747
"""
4848
if os.name == 'nt':
4949
# pragma pylint: disable=import-error
5050
return msvcrt.getch().decode("utf-8")
5151
else:
52-
return sys.stdin.buffer.read(1)
52+
return sys.stdin.read(1)
5353

5454

5555
"""

0 commit comments

Comments
 (0)