Skip to content

Fix stdlib/curses.pyi TODO RE: Concatenate usage #8414

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions stdlib/curses/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import sys
from collections.abc import Callable
from typing import Any, TypeVar
from typing import TypeVar
from typing_extensions import Concatenate, ParamSpec

if sys.platform != "win32":
from _curses import *
from _curses import _CursesWindow as _CursesWindow

_T = TypeVar("_T")
_P = ParamSpec("_P")

# available after calling `curses.initscr()`
LINES: int
Expand All @@ -15,6 +17,5 @@ if sys.platform != "win32":
# available after calling `curses.start_color()`
COLORS: int
COLOR_PAIRS: int
# TODO: wait for `Concatenate` support
# def wrapper(__func: Callable[Concatenate[_CursesWindow, _P], _T], *arg: _P.args, **kwds: _P.kwargs) -> _T: ...
def wrapper(__func: Callable[..., _T], *arg: Any, **kwds: Any) -> _T: ...

def wrapper(__func: Callable[Concatenate[_CursesWindow, _P], _T], *arg: _P.args, **kwds: _P.kwargs) -> _T: ...