mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
curses is not available on Windows (#6749)
This commit is contained in:
1096
stdlib/_curses.pyi
1096
stdlib/_curses.pyi
File diff suppressed because it is too large
Load Diff
@@ -1,15 +1,17 @@
|
||||
from _curses import * # noqa: F403
|
||||
from _curses import _CursesWindow as _CursesWindow
|
||||
import sys
|
||||
from typing import Any, Callable, TypeVar
|
||||
|
||||
_T = TypeVar("_T")
|
||||
if sys.platform != "win32":
|
||||
from _curses import * # noqa: F403
|
||||
from _curses import _CursesWindow as _CursesWindow
|
||||
|
||||
# available after calling `curses.initscr()`
|
||||
LINES: int
|
||||
COLS: int
|
||||
_T = TypeVar("_T")
|
||||
|
||||
# available after calling `curses.start_color()`
|
||||
COLORS: int
|
||||
COLOR_PAIRS: int
|
||||
# available after calling `curses.initscr()`
|
||||
LINES: int
|
||||
COLS: int
|
||||
|
||||
def wrapper(__func: Callable[..., _T], *arg: Any, **kwds: Any) -> _T: ...
|
||||
# available after calling `curses.start_color()`
|
||||
COLORS: int
|
||||
COLOR_PAIRS: int
|
||||
def wrapper(__func: Callable[..., _T], *arg: Any, **kwds: Any) -> _T: ...
|
||||
|
||||
@@ -1,62 +1,63 @@
|
||||
import sys
|
||||
from typing import TypeVar
|
||||
|
||||
_CharT = TypeVar("_CharT", str, int)
|
||||
if sys.platform != "win32":
|
||||
_CharT = TypeVar("_CharT", str, int)
|
||||
|
||||
NUL: int
|
||||
SOH: int
|
||||
STX: int
|
||||
ETX: int
|
||||
EOT: int
|
||||
ENQ: int
|
||||
ACK: int
|
||||
BEL: int
|
||||
BS: int
|
||||
TAB: int
|
||||
HT: int
|
||||
LF: int
|
||||
NL: int
|
||||
VT: int
|
||||
FF: int
|
||||
CR: int
|
||||
SO: int
|
||||
SI: int
|
||||
DLE: int
|
||||
DC1: int
|
||||
DC2: int
|
||||
DC3: int
|
||||
DC4: int
|
||||
NAK: int
|
||||
SYN: int
|
||||
ETB: int
|
||||
CAN: int
|
||||
EM: int
|
||||
SUB: int
|
||||
ESC: int
|
||||
FS: int
|
||||
GS: int
|
||||
RS: int
|
||||
US: int
|
||||
SP: int
|
||||
DEL: int
|
||||
NUL: int
|
||||
SOH: int
|
||||
STX: int
|
||||
ETX: int
|
||||
EOT: int
|
||||
ENQ: int
|
||||
ACK: int
|
||||
BEL: int
|
||||
BS: int
|
||||
TAB: int
|
||||
HT: int
|
||||
LF: int
|
||||
NL: int
|
||||
VT: int
|
||||
FF: int
|
||||
CR: int
|
||||
SO: int
|
||||
SI: int
|
||||
DLE: int
|
||||
DC1: int
|
||||
DC2: int
|
||||
DC3: int
|
||||
DC4: int
|
||||
NAK: int
|
||||
SYN: int
|
||||
ETB: int
|
||||
CAN: int
|
||||
EM: int
|
||||
SUB: int
|
||||
ESC: int
|
||||
FS: int
|
||||
GS: int
|
||||
RS: int
|
||||
US: int
|
||||
SP: int
|
||||
DEL: int
|
||||
|
||||
controlnames: list[int]
|
||||
|
||||
def isalnum(c: str | int) -> bool: ...
|
||||
def isalpha(c: str | int) -> bool: ...
|
||||
def isascii(c: str | int) -> bool: ...
|
||||
def isblank(c: str | int) -> bool: ...
|
||||
def iscntrl(c: str | int) -> bool: ...
|
||||
def isdigit(c: str | int) -> bool: ...
|
||||
def isgraph(c: str | int) -> bool: ...
|
||||
def islower(c: str | int) -> bool: ...
|
||||
def isprint(c: str | int) -> bool: ...
|
||||
def ispunct(c: str | int) -> bool: ...
|
||||
def isspace(c: str | int) -> bool: ...
|
||||
def isupper(c: str | int) -> bool: ...
|
||||
def isxdigit(c: str | int) -> bool: ...
|
||||
def isctrl(c: str | int) -> bool: ...
|
||||
def ismeta(c: str | int) -> bool: ...
|
||||
def ascii(c: _CharT) -> _CharT: ...
|
||||
def ctrl(c: _CharT) -> _CharT: ...
|
||||
def alt(c: _CharT) -> _CharT: ...
|
||||
def unctrl(c: str | int) -> str: ...
|
||||
controlnames: list[int]
|
||||
def isalnum(c: str | int) -> bool: ...
|
||||
def isalpha(c: str | int) -> bool: ...
|
||||
def isascii(c: str | int) -> bool: ...
|
||||
def isblank(c: str | int) -> bool: ...
|
||||
def iscntrl(c: str | int) -> bool: ...
|
||||
def isdigit(c: str | int) -> bool: ...
|
||||
def isgraph(c: str | int) -> bool: ...
|
||||
def islower(c: str | int) -> bool: ...
|
||||
def isprint(c: str | int) -> bool: ...
|
||||
def ispunct(c: str | int) -> bool: ...
|
||||
def isspace(c: str | int) -> bool: ...
|
||||
def isupper(c: str | int) -> bool: ...
|
||||
def isxdigit(c: str | int) -> bool: ...
|
||||
def isctrl(c: str | int) -> bool: ...
|
||||
def ismeta(c: str | int) -> bool: ...
|
||||
def ascii(c: _CharT) -> _CharT: ...
|
||||
def ctrl(c: _CharT) -> _CharT: ...
|
||||
def alt(c: _CharT) -> _CharT: ...
|
||||
def unctrl(c: str | int) -> str: ...
|
||||
|
||||
@@ -1,22 +1,23 @@
|
||||
from _curses import _CursesWindow
|
||||
import sys
|
||||
|
||||
version: str
|
||||
if sys.platform != "win32":
|
||||
from _curses import _CursesWindow
|
||||
|
||||
class _Curses_Panel: # type is <class '_curses_panel.curses panel'> (note the space in the class name)
|
||||
def above(self) -> _Curses_Panel: ...
|
||||
def below(self) -> _Curses_Panel: ...
|
||||
def bottom(self) -> None: ...
|
||||
def hidden(self) -> bool: ...
|
||||
def hide(self) -> None: ...
|
||||
def move(self, y: int, x: int) -> None: ...
|
||||
def replace(self, win: _CursesWindow) -> None: ...
|
||||
def set_userptr(self, obj: object) -> None: ...
|
||||
def show(self) -> None: ...
|
||||
def top(self) -> None: ...
|
||||
def userptr(self) -> object: ...
|
||||
def window(self) -> _CursesWindow: ...
|
||||
|
||||
def bottom_panel() -> _Curses_Panel: ...
|
||||
def new_panel(__win: _CursesWindow) -> _Curses_Panel: ...
|
||||
def top_panel() -> _Curses_Panel: ...
|
||||
def update_panels() -> _Curses_Panel: ...
|
||||
version: str
|
||||
class _Curses_Panel: # type is <class '_curses_panel.curses panel'> (note the space in the class name)
|
||||
def above(self) -> _Curses_Panel: ...
|
||||
def below(self) -> _Curses_Panel: ...
|
||||
def bottom(self) -> None: ...
|
||||
def hidden(self) -> bool: ...
|
||||
def hide(self) -> None: ...
|
||||
def move(self, y: int, x: int) -> None: ...
|
||||
def replace(self, win: _CursesWindow) -> None: ...
|
||||
def set_userptr(self, obj: object) -> None: ...
|
||||
def show(self) -> None: ...
|
||||
def top(self) -> None: ...
|
||||
def userptr(self) -> object: ...
|
||||
def window(self) -> _CursesWindow: ...
|
||||
def bottom_panel() -> _Curses_Panel: ...
|
||||
def new_panel(__win: _CursesWindow) -> _Curses_Panel: ...
|
||||
def top_panel() -> _Curses_Panel: ...
|
||||
def update_panels() -> _Curses_Panel: ...
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
from _curses import _CursesWindow
|
||||
import sys
|
||||
from typing import Callable
|
||||
|
||||
def rectangle(win: _CursesWindow, uly: int, ulx: int, lry: int, lrx: int) -> None: ...
|
||||
|
||||
class Textbox:
|
||||
stripspaces: bool
|
||||
def __init__(self, win: _CursesWindow, insert_mode: bool = ...) -> None: ...
|
||||
def edit(self, validate: Callable[[int], int] | None = ...) -> str: ...
|
||||
def do_command(self, ch: str | int) -> None: ...
|
||||
def gather(self) -> str: ...
|
||||
if sys.platform != "win32":
|
||||
from _curses import _CursesWindow
|
||||
def rectangle(win: _CursesWindow, uly: int, ulx: int, lry: int, lrx: int) -> None: ...
|
||||
class Textbox:
|
||||
stripspaces: bool
|
||||
def __init__(self, win: _CursesWindow, insert_mode: bool = ...) -> None: ...
|
||||
def edit(self, validate: Callable[[int], int] | None = ...) -> str: ...
|
||||
def do_command(self, ch: str | int) -> None: ...
|
||||
def gather(self) -> str: ...
|
||||
|
||||
Reference in New Issue
Block a user