Skip to content

Commit e0aa539

Browse files
_curses: improve bytes handling (#9007)
1 parent 5bcd4c1 commit e0aa539

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

stdlib/_curses.pyi

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import sys
2-
from _typeshed import SupportsRead
2+
from _typeshed import ReadOnlyBuffer, SupportsRead
33
from typing import IO, Any, NamedTuple, overload
44
from typing_extensions import TypeAlias, final
55

66
if sys.platform != "win32":
7+
# Handled by PyCurses_ConvertToChtype in _cursesmodule.c.
78
_ChType: TypeAlias = str | bytes | int
89

910
# ACS codes are only initialized after initscr is called
@@ -330,7 +331,7 @@ if sys.platform != "win32":
330331
def noraw() -> None: ...
331332
def pair_content(__pair_number: int) -> tuple[int, int]: ...
332333
def pair_number(__attr: int) -> int: ...
333-
def putp(__string: bytes) -> None: ...
334+
def putp(__string: ReadOnlyBuffer) -> None: ...
334335
def qiflush(__flag: bool = ...) -> None: ...
335336
def raw(__flag: bool = ...) -> None: ...
336337
def reset_prog_mode() -> None: ...
@@ -352,7 +353,7 @@ if sys.platform != "win32":
352353
def tigetnum(__capname: str) -> int: ...
353354
def tigetstr(__capname: str) -> bytes | None: ...
354355
def tparm(
355-
__str: bytes,
356+
__str: ReadOnlyBuffer,
356357
__i1: int = ...,
357358
__i2: int = ...,
358359
__i3: int = ...,

0 commit comments

Comments
 (0)