From d7e9b1f5dc8cedb7f27d2833dccf2283114eb004 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Wed, 2 Nov 2022 21:14:34 -0700 Subject: [PATCH] msvcrt: improve bytes handling These use the "char" Argument Clinic type, which corresponds to bytes or bytearray. --- stdlib/msvcrt.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/msvcrt.pyi b/stdlib/msvcrt.pyi index 0bea8ce22b06..5849b9b00ca0 100644 --- a/stdlib/msvcrt.pyi +++ b/stdlib/msvcrt.pyi @@ -21,8 +21,8 @@ if sys.platform == "win32": def getwch() -> str: ... def getche() -> bytes: ... def getwche() -> str: ... - def putch(__char: bytes) -> None: ... + def putch(__char: bytes | bytearray) -> None: ... def putwch(__unicode_char: str) -> None: ... - def ungetch(__char: bytes) -> None: ... + def ungetch(__char: bytes | bytearray) -> None: ... def ungetwch(__unicode_char: str) -> None: ... def heapmin() -> None: ...