Move stdlib/3/curses to stdlib/2and3/curses. (#3025)

Also add the A_ITALIC constant, which is new in 3.7.
This commit is contained in:
Rebecca Chen
2019-06-01 01:51:07 -07:00
committed by Sebastian Rittau
parent dd244d1200
commit f8093d63cd
5 changed files with 14 additions and 7 deletions

View File

@@ -0,0 +1,12 @@
import _curses
from _curses import * # noqa: F403
from typing import TypeVar, Callable, Any, Sequence, Mapping
_T = TypeVar('_T')
LINES: int
COLS: int
def initscr() -> _curses._CursesWindow: ...
def start_color() -> None: ...
def wrapper(func: Callable[..., _T], *arg: Any, **kwds: Any) -> _T: ...

View File

@@ -0,0 +1,62 @@
from typing import List, Union, overload, TypeVar
_Ch = TypeVar('_Ch', 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
controlnames: List[int]
def isalnum(c: Union[str, int]) -> bool: ...
def isalpha(c: Union[str, int]) -> bool: ...
def isascii(c: Union[str, int]) -> bool: ...
def isblank(c: Union[str, int]) -> bool: ...
def iscntrl(c: Union[str, int]) -> bool: ...
def isdigit(c: Union[str, int]) -> bool: ...
def isgraph(c: Union[str, int]) -> bool: ...
def islower(c: Union[str, int]) -> bool: ...
def isprint(c: Union[str, int]) -> bool: ...
def ispunct(c: Union[str, int]) -> bool: ...
def isspace(c: Union[str, int]) -> bool: ...
def isupper(c: Union[str, int]) -> bool: ...
def isxdigit(c: Union[str, int]) -> bool: ...
def isctrl(c: Union[str, int]) -> bool: ...
def ismeta(c: Union[str, int]) -> bool: ...
def ascii(c: _Ch) -> _Ch: ...
def ctrl(c: _Ch) -> _Ch: ...
def alt(c: _Ch) -> _Ch: ...
def unctrl(c: Union[str, int]) -> str: ...

View File

@@ -0,0 +1,20 @@
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: ...

View File

@@ -0,0 +1,11 @@
from _curses import _CursesWindow
from typing import Callable, Union
def rectangle(win: _CursesWindow, uly: int, ulx: int, lry: int, lrx: int) -> None: ...
class Textbox:
stripspaces: bool
def __init__(self, w: _CursesWindow, insert_mode: bool = ...) -> None: ...
def edit(self, validate: Callable[[int], int]) -> str: ...
def do_command(self, ch: Union[str, int]) -> None: ...
def gather(self) -> str: ...