From 0234e2aa6b3ba49c40cde1bc546425af0d1bd8f6 Mon Sep 17 00:00:00 2001 From: Marenz Date: Wed, 18 May 2022 14:46:26 +0200 Subject: [PATCH] lsp.py: Fix broken console reading --- test/lsp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/lsp.py b/test/lsp.py index 9a4335d73..625d27e13 100755 --- a/test/lsp.py +++ b/test/lsp.py @@ -41,7 +41,7 @@ def escape_string(text: str) -> str: })) -def getCharFromStdin(): +def getCharFromStdin() -> str: """ Gets a single character from stdin without line-buffering. """ @@ -49,7 +49,7 @@ def getCharFromStdin(): # pragma pylint: disable=import-error return msvcrt.getch().decode("utf-8") else: - return sys.stdin.buffer.read(1) + return sys.stdin.read(1) """