curses: various fixes (#3771)

- fix arg names
- fix types based on default value
- mark positional-only args
This commit is contained in:
Shantanu
2020-02-21 21:27:42 -08:00
committed by GitHub
parent b1071639b9
commit 0435be3432
5 changed files with 5 additions and 9 deletions

View File

@@ -12,4 +12,4 @@ COLS: int
COLORS: int
COLOR_PAIRS: int
def wrapper(func: Callable[..., _T], *arg: Any, **kwds: Any) -> _T: ...
def wrapper(__func: Callable[..., _T], *arg: Any, **kwds: Any) -> _T: ...

View File

@@ -15,6 +15,6 @@ class _Curses_Panel: # type is <class '_curses_panel.curses panel'> (note the s
def window(self) -> _CursesWindow: ...
def bottom_panel() -> _Curses_Panel: ...
def new_panel(win: _CursesWindow) -> _Curses_Panel: ...
def new_panel(__win: _CursesWindow) -> _Curses_Panel: ...
def top_panel() -> _Curses_Panel: ...
def update_panels() -> _Curses_Panel: ...

View File

@@ -1,11 +1,11 @@
from _curses import _CursesWindow
from typing import Callable, Union
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, w: _CursesWindow, insert_mode: bool = ...) -> None: ...
def edit(self, validate: Callable[[int], int]) -> str: ...
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: ...