From d69a864a8862fc3ede933722400ee818e88905af Mon Sep 17 00:00:00 2001 From: Konstantin Baikov Date: Mon, 30 Dec 2024 02:12:42 +0100 Subject: [PATCH] Use SupportsWrite in curses instead of IO Any (#13325) The source used to deduce this: https://github.com/python/cpython/blob/aea2e03b276c79f8934d17056a68899e69763fae/Modules/_cursesmodule.c#L2158 --- stdlib/_curses.pyi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stdlib/_curses.pyi b/stdlib/_curses.pyi index 9e06a1414..52c518572 100644 --- a/stdlib/_curses.pyi +++ b/stdlib/_curses.pyi @@ -1,7 +1,7 @@ import sys -from _typeshed import ReadOnlyBuffer, SupportsRead +from _typeshed import ReadOnlyBuffer, SupportsRead, SupportsWrite from curses import _ncurses_version -from typing import IO, Any, final, overload +from typing import Any, final, overload from typing_extensions import TypeAlias # NOTE: This module is ordinarily only available on Unix, but the windows-curses @@ -517,7 +517,7 @@ class window: # undocumented def overwrite( self, destwin: window, sminrow: int, smincol: int, dminrow: int, dmincol: int, dmaxrow: int, dmaxcol: int ) -> None: ... - def putwin(self, file: IO[Any], /) -> None: ... + def putwin(self, file: SupportsWrite[bytes], /) -> None: ... def redrawln(self, beg: int, num: int, /) -> None: ... def redrawwin(self) -> None: ... @overload