stdlib: enforce CamelCase for type alias names (#8255)

This commit is contained in:
Alex Waygood
2022-07-07 16:45:23 +01:00
committed by GitHub
parent abea36c069
commit fbddd2c4e2
11 changed files with 107 additions and 108 deletions

View File

@@ -4,7 +4,7 @@ from typing import IO, Any, NamedTuple, overload
from typing_extensions import TypeAlias, final
if sys.platform != "win32":
_chtype: TypeAlias = str | bytes | int
_ChType: TypeAlias = str | bytes | int
# ACS codes are only initialized after initscr is called
ACS_BBSS: int
@@ -365,9 +365,9 @@ if sys.platform != "win32":
__i9: int = ...,
) -> bytes: ...
def typeahead(__fd: int) -> None: ...
def unctrl(__ch: _chtype) -> bytes: ...
def unctrl(__ch: _ChType) -> bytes: ...
def unget_wch(__ch: int | str) -> None: ...
def ungetch(__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() -> None: ...
def use_default_colors() -> None: ...
@@ -379,9 +379,9 @@ if sys.platform != "win32":
class _CursesWindow:
encoding: str
@overload
def addch(self, ch: _chtype, attr: int = ...) -> None: ...
def addch(self, ch: _ChType, attr: int = ...) -> None: ...
@overload
def addch(self, y: int, x: int, ch: _chtype, attr: int = ...) -> None: ...
def addch(self, y: int, x: int, ch: _ChType, attr: int = ...) -> None: ...
@overload
def addnstr(self, str: str, n: int, attr: int = ...) -> None: ...
@overload
@@ -393,23 +393,23 @@ if sys.platform != "win32":
def attroff(self, __attr: int) -> None: ...
def attron(self, __attr: int) -> None: ...
def attrset(self, __attr: int) -> None: ...
def bkgd(self, __ch: _chtype, __attr: int = ...) -> None: ...
def bkgdset(self, __ch: _chtype, __attr: int = ...) -> None: ...
def bkgd(self, __ch: _ChType, __attr: int = ...) -> None: ...
def bkgdset(self, __ch: _ChType, __attr: int = ...) -> None: ...
def border(
self,
ls: _chtype = ...,
rs: _chtype = ...,
ts: _chtype = ...,
bs: _chtype = ...,
tl: _chtype = ...,
tr: _chtype = ...,
bl: _chtype = ...,
br: _chtype = ...,
ls: _ChType = ...,
rs: _ChType = ...,
ts: _ChType = ...,
bs: _ChType = ...,
tl: _ChType = ...,
tr: _ChType = ...,
bl: _ChType = ...,
br: _ChType = ...,
) -> None: ...
@overload
def box(self) -> None: ...
@overload
def box(self, vertch: _chtype = ..., horch: _chtype = ...) -> None: ...
def box(self, vertch: _ChType = ..., horch: _ChType = ...) -> None: ...
@overload
def chgat(self, attr: int) -> None: ...
@overload
@@ -432,7 +432,7 @@ if sys.platform != "win32":
def derwin(self, begin_y: int, begin_x: int) -> _CursesWindow: ...
@overload
def derwin(self, nlines: int, ncols: int, begin_y: int, begin_x: int) -> _CursesWindow: ...
def echochar(self, __ch: _chtype, __attr: int = ...) -> None: ...
def echochar(self, __ch: _ChType, __attr: int = ...) -> None: ...
def enclose(self, __y: int, __x: int) -> bool: ...
def erase(self) -> None: ...
def getbegyx(self) -> tuple[int, int]: ...
@@ -461,9 +461,9 @@ if sys.platform != "win32":
def getstr(self, y: int, x: int, n: int) -> bytes: ...
def getyx(self) -> tuple[int, int]: ...
@overload
def hline(self, ch: _chtype, n: int) -> None: ...
def hline(self, ch: _ChType, n: int) -> None: ...
@overload
def hline(self, y: int, x: int, ch: _chtype, n: int) -> None: ...
def hline(self, y: int, x: int, ch: _ChType, n: int) -> None: ...
def idcok(self, flag: bool) -> None: ...
def idlok(self, yes: bool) -> None: ...
def immedok(self, flag: bool) -> None: ...
@@ -472,9 +472,9 @@ if sys.platform != "win32":
@overload
def inch(self, y: int, x: int) -> int: ...
@overload
def insch(self, ch: _chtype, attr: int = ...) -> None: ...
def insch(self, ch: _ChType, attr: int = ...) -> None: ...
@overload
def insch(self, y: int, x: int, ch: _chtype, attr: int = ...) -> None: ...
def insch(self, y: int, x: int, ch: _ChType, attr: int = ...) -> None: ...
def insdelln(self, nlines: int) -> None: ...
def insertln(self) -> None: ...
@overload
@@ -543,9 +543,9 @@ if sys.platform != "win32":
def touchwin(self) -> None: ...
def untouchwin(self) -> None: ...
@overload
def vline(self, ch: _chtype, n: int) -> None: ...
def vline(self, ch: _ChType, n: int) -> None: ...
@overload
def vline(self, y: int, x: int, ch: _chtype, n: int) -> None: ...
def vline(self, y: int, x: int, ch: _ChType, n: int) -> None: ...
if sys.version_info >= (3, 8):
class _ncurses_version(NamedTuple):
major: int