lsp.py: Fix broken console reading

This commit is contained in:
Marenz
2022-05-18 14:54:19 +02:00
parent ca3af4b2a2
commit 0234e2aa6b
+2 -2
View File
@@ -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)
"""