mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-16 00:37:10 +08:00
Fixes to curses stubs (#6620)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import sys
|
||||
from typing import IO, Any, BinaryIO, NamedTuple, Union, overload
|
||||
from _typeshed import SupportsRead
|
||||
from typing import IO, Any, NamedTuple, Union, overload
|
||||
|
||||
_chtype = Union[str, bytes, int]
|
||||
|
||||
@@ -293,9 +294,14 @@ def erasechar() -> bytes: ...
|
||||
def filter() -> None: ...
|
||||
def flash() -> None: ...
|
||||
def flushinp() -> None: ...
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
def get_escdelay() -> int: ...
|
||||
def get_tabsize() -> int: ...
|
||||
|
||||
def getmouse() -> tuple[int, int, int, int, int]: ...
|
||||
def getsyx() -> tuple[int, int]: ...
|
||||
def getwin(__file: BinaryIO) -> _CursesWindow: ...
|
||||
def getwin(__file: SupportsRead[bytes]) -> _CursesWindow: ...
|
||||
def halfdelay(__tenths: int) -> None: ...
|
||||
def has_colors() -> bool: ...
|
||||
|
||||
@@ -337,6 +343,11 @@ def resetty() -> None: ...
|
||||
def resize_term(__nlines: int, __ncols: int) -> None: ...
|
||||
def resizeterm(__nlines: int, __ncols: int) -> None: ...
|
||||
def savetty() -> None: ...
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
def set_escdelay(__ms: int) -> None: ...
|
||||
def set_tabsize(__size: int) -> None: ...
|
||||
|
||||
def setsyx(__y: int, __x: int) -> None: ...
|
||||
def setupterm(term: str | None = ..., fd: int = ...) -> None: ...
|
||||
def start_color() -> None: ...
|
||||
@@ -344,7 +355,7 @@ def termattrs() -> int: ...
|
||||
def termname() -> bytes: ...
|
||||
def tigetflag(__capname: str) -> int: ...
|
||||
def tigetnum(__capname: str) -> int: ...
|
||||
def tigetstr(__capname: str) -> bytes: ...
|
||||
def tigetstr(__capname: str) -> bytes | None: ...
|
||||
def tparm(
|
||||
__str: bytes,
|
||||
__i1: int = ...,
|
||||
@@ -362,7 +373,7 @@ def unctrl(__ch: _chtype) -> bytes: ...
|
||||
def unget_wch(__ch: int | str) -> None: ...
|
||||
def ungetch(__ch: _chtype) -> None: ...
|
||||
def ungetmouse(__id: int, __x: int, __y: int, __z: int, __bstate: int) -> None: ...
|
||||
def update_lines_cols() -> int: ...
|
||||
def update_lines_cols() -> None: ...
|
||||
def use_default_colors() -> None: ...
|
||||
def use_env(__flag: bool) -> None: ...
|
||||
|
||||
|
||||
@@ -3,10 +3,6 @@ _curses.color_pair
|
||||
curses.color_pair
|
||||
|
||||
# Exists at runtime, but missing from stubs
|
||||
_curses.get_escdelay
|
||||
_curses.get_tabsize
|
||||
_curses.set_escdelay
|
||||
_curses.set_tabsize
|
||||
asyncio.PidfdChildWatcher
|
||||
asyncio.unix_events.PidfdChildWatcher
|
||||
os.CLD_KILLED
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
_?curses.A_ITALIC
|
||||
|
||||
# Exists at runtime, but missing from stubs
|
||||
_curses.get_escdelay
|
||||
_curses.get_tabsize
|
||||
_curses.set_escdelay
|
||||
_curses.set_tabsize
|
||||
asyncio.PidfdChildWatcher
|
||||
asyncio.unix_events.PidfdChildWatcher
|
||||
os.CLD_KILLED
|
||||
|
||||
@@ -18,10 +18,6 @@ signal.sigwaitinfo
|
||||
select.epoll.register
|
||||
|
||||
# Exists at runtime, but missing from stubs
|
||||
_curses.get_escdelay
|
||||
_curses.get_tabsize
|
||||
_curses.set_escdelay
|
||||
_curses.set_tabsize
|
||||
asyncio.PidfdChildWatcher
|
||||
asyncio.unix_events.PidfdChildWatcher
|
||||
os.CLD_KILLED
|
||||
|
||||
@@ -2,10 +2,6 @@
|
||||
select.epoll.register
|
||||
|
||||
# Exists at runtime, but missing from stubs
|
||||
_curses.get_escdelay
|
||||
_curses.get_tabsize
|
||||
_curses.set_escdelay
|
||||
_curses.set_tabsize
|
||||
asyncio.PidfdChildWatcher
|
||||
asyncio.unix_events.PidfdChildWatcher
|
||||
os.CLD_KILLED
|
||||
|
||||
Reference in New Issue
Block a user