mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
Big diff: Use new "|" union syntax (#5872)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import sys
|
||||
from typing import IO, Any, BinaryIO, NamedTuple, Optional, Tuple, Union, overload
|
||||
from typing import IO, Any, BinaryIO, NamedTuple, Tuple, Union, overload
|
||||
|
||||
_chtype = Union[str, bytes, int]
|
||||
|
||||
@@ -338,7 +338,7 @@ def resize_term(__nlines: int, __ncols: int) -> None: ...
|
||||
def resizeterm(__nlines: int, __ncols: int) -> None: ...
|
||||
def savetty() -> None: ...
|
||||
def setsyx(__y: int, __x: int) -> None: ...
|
||||
def setupterm(term: Optional[str] = ..., fd: int = ...) -> None: ...
|
||||
def setupterm(term: str | None = ..., fd: int = ...) -> None: ...
|
||||
def start_color() -> None: ...
|
||||
def termattrs() -> int: ...
|
||||
def termname() -> bytes: ...
|
||||
@@ -359,7 +359,7 @@ def tparm(
|
||||
) -> bytes: ...
|
||||
def typeahead(__fd: int) -> None: ...
|
||||
def unctrl(__ch: _chtype) -> bytes: ...
|
||||
def unget_wch(__ch: Union[int, str]) -> None: ...
|
||||
def unget_wch(__ch: int | str) -> None: ...
|
||||
def ungetch(__ch: _chtype) -> None: ...
|
||||
def ungetmouse(__id: int, __x: int, __y: int, __z: int, __bstate: int) -> None: ...
|
||||
def update_lines_cols() -> int: ...
|
||||
@@ -434,9 +434,9 @@ class _CursesWindow:
|
||||
@overload
|
||||
def getch(self, y: int, x: int) -> int: ...
|
||||
@overload
|
||||
def get_wch(self) -> Union[int, str]: ...
|
||||
def get_wch(self) -> int | str: ...
|
||||
@overload
|
||||
def get_wch(self, y: int, x: int) -> Union[int, str]: ...
|
||||
def get_wch(self, y: int, x: int) -> int | str: ...
|
||||
@overload
|
||||
def getkey(self) -> str: ...
|
||||
@overload
|
||||
|
||||
Reference in New Issue
Block a user