-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Source commit: python/typeshed@7c8e82f Co-authored-by: mypybot <> Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com> Co-authored-by: AlexWaygood <alex.waygood@gmail.com>
- Loading branch information
1 parent
e2fc1f2
commit 5161ac2
Showing
17 changed files
with
795 additions
and
730 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,22 @@ | ||
import sys | ||
from _curses import * | ||
from _curses import _CursesWindow as _CursesWindow | ||
from collections.abc import Callable | ||
from typing import TypeVar | ||
from typing_extensions import Concatenate, ParamSpec | ||
|
||
if sys.platform != "win32": | ||
from _curses import * | ||
from _curses import _CursesWindow as _CursesWindow | ||
# NOTE: The _curses module is ordinarily only available on Unix, but the | ||
# windows-curses package makes it available on Windows as well with the same | ||
# contents. | ||
|
||
_T = TypeVar("_T") | ||
_P = ParamSpec("_P") | ||
_T = TypeVar("_T") | ||
_P = ParamSpec("_P") | ||
|
||
# available after calling `curses.initscr()` | ||
LINES: int | ||
COLS: int | ||
# available after calling `curses.initscr()` | ||
LINES: int | ||
COLS: int | ||
|
||
# available after calling `curses.start_color()` | ||
COLORS: int | ||
COLOR_PAIRS: int | ||
# available after calling `curses.start_color()` | ||
COLORS: int | ||
COLOR_PAIRS: int | ||
|
||
def wrapper(func: Callable[Concatenate[_CursesWindow, _P], _T], /, *arg: _P.args, **kwds: _P.kwargs) -> _T: ... | ||
def wrapper(func: Callable[Concatenate[_CursesWindow, _P], _T], /, *arg: _P.args, **kwds: _P.kwargs) -> _T: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,62 @@ | ||
import sys | ||
from typing import TypeVar | ||
|
||
if sys.platform != "win32": | ||
_CharT = TypeVar("_CharT", str, int) | ||
_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: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
import sys | ||
|
||
if sys.platform != "win32": | ||
def has_key(ch: int | str) -> bool: ... | ||
def has_key(ch: int | str) -> bool: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,22 @@ | ||
import sys | ||
from _curses import _CursesWindow | ||
|
||
if sys.platform != "win32": | ||
from _curses import _CursesWindow | ||
version: str | ||
|
||
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: ... | ||
|
||
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: ... | ||
def bottom_panel() -> _Curses_Panel: ... | ||
def new_panel(win: _CursesWindow, /) -> _Curses_Panel: ... | ||
def top_panel() -> _Curses_Panel: ... | ||
def update_panels() -> _Curses_Panel: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
import sys | ||
from _curses import _CursesWindow | ||
from collections.abc import Callable | ||
|
||
if sys.platform != "win32": | ||
from _curses import _CursesWindow | ||
def rectangle(win: _CursesWindow, uly: int, ulx: int, lry: int, lrx: int) -> None: ... | ||
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 = False) -> None: ... | ||
def edit(self, validate: Callable[[int], int] | None = None) -> str: ... | ||
def do_command(self, ch: str | int) -> None: ... | ||
def gather(self) -> str: ... | ||
class Textbox: | ||
stripspaces: bool | ||
def __init__(self, win: _CursesWindow, insert_mode: bool = False) -> None: ... | ||
def edit(self, validate: Callable[[int], int] | None = None) -> str: ... | ||
def do_command(self, ch: str | int) -> None: ... | ||
def gather(self) -> str: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.