diff --git a/stdlib/3/_curses.pyi b/stdlib/2and3/_curses.pyi similarity index 96% rename from stdlib/3/_curses.pyi rename to stdlib/2and3/_curses.pyi index 16c6fd774..836089f5b 100644 --- a/stdlib/3/_curses.pyi +++ b/stdlib/2and3/_curses.pyi @@ -1,3 +1,4 @@ +import sys from typing import Any, BinaryIO, IO, Optional, Tuple, Union, overload _chtype = Union[str, bytes, int] @@ -12,6 +13,8 @@ A_COLOR: int A_DIM: int A_HORIZONTAL: int A_INVIS: int +if sys.version_info >= (3, 7): + A_ITALIC: int A_LEFT: int A_LOW: int A_NORMAL: int @@ -283,17 +286,20 @@ def tigetstr(capname: str) -> bytes: ... def tparm(fmt: bytes, i1: int = ..., i2: int = ..., i3: int = ..., i4: int = ..., i5: int = ..., i6: int = ..., i7: int = ..., i8: int = ..., i9: int = ...) -> bytes: ... def typeahead(fd: int) -> None: ... def unctrl(ch: _chtype) -> bytes: ... -def unget_wch(ch: _chtype) -> None: ... +if sys.version_info >= (3, 3): + def unget_wch(ch: _chtype) -> None: ... def ungetch(ch: _chtype) -> None: ... def ungetmouse(id: int, x: int, y: int, z: int, bstate: int) -> None: ... -def update_lines_cols() -> int: ... +if sys.version_info >= (3, 5): + def update_lines_cols() -> int: ... def use_default_colors() -> None: ... def use_env(flag: bool) -> None: ... class error(Exception): ... class _CursesWindow: - encoding: str + if sys.version_info >= (3, 3): + encoding: str @overload def addch(self, ch: _chtype, attr: int = ...) -> None: ... @overload @@ -347,10 +353,11 @@ class _CursesWindow: def getch(self) -> _chtype: ... @overload def getch(self, y: int, x: int) -> _chtype: ... - @overload - def get_wch(self) -> _chtype: ... - @overload - def get_wch(self, y: int, x: int) -> _chtype: ... + if sys.version_info >= (3, 3): + @overload + def get_wch(self) -> _chtype: ... + @overload + def get_wch(self, y: int, x: int) -> _chtype: ... @overload def getkey(self) -> str: ... @overload diff --git a/stdlib/3/curses/__init__.pyi b/stdlib/2and3/curses/__init__.pyi similarity index 100% rename from stdlib/3/curses/__init__.pyi rename to stdlib/2and3/curses/__init__.pyi diff --git a/stdlib/3/curses/ascii.pyi b/stdlib/2and3/curses/ascii.pyi similarity index 100% rename from stdlib/3/curses/ascii.pyi rename to stdlib/2and3/curses/ascii.pyi diff --git a/stdlib/3/curses/panel.pyi b/stdlib/2and3/curses/panel.pyi similarity index 100% rename from stdlib/3/curses/panel.pyi rename to stdlib/2and3/curses/panel.pyi diff --git a/stdlib/3/curses/textpad.pyi b/stdlib/2and3/curses/textpad.pyi similarity index 100% rename from stdlib/3/curses/textpad.pyi rename to stdlib/2and3/curses/textpad.pyi