Split stdlib into Python 2 and 3 versions (#5442)

All new files in stdlib/@python2 are straight copies of the
corresponding files in stdlib.
This commit is contained in:
Sebastian Rittau
2021-05-14 21:04:12 +02:00
committed by GitHub
parent 8971c242cb
commit 5b739e0ccb
218 changed files with 18067 additions and 15 deletions

View File

@@ -0,0 +1,15 @@
from _curses import * # noqa: F403
from _curses import _CursesWindow as _CursesWindow
from typing import Any, Callable, TypeVar
_T = TypeVar("_T")
# available after calling `curses.initscr()`
LINES: int
COLS: int
# available after calling `curses.start_color()`
COLORS: int
COLOR_PAIRS: int
def wrapper(__func: Callable[..., _T], *arg: Any, **kwds: Any) -> _T: ...

View File

@@ -0,0 +1,62 @@
from typing import List, TypeVar, Union
_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
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: _CharT) -> _CharT: ...
def ctrl(c: _CharT) -> _CharT: ...
def alt(c: _CharT) -> _CharT: ...
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, Optional, Union
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: Optional[Callable[[int], int]] = ...) -> str: ...
def do_command(self, ch: Union[str, int]) -> None: ...
def gather(self) -> str: ...