Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Change type alias name
  • Loading branch information
srittau committed Sep 27, 2023
commit 73e788687cc9ca08613c5d0ce7c91f863f5bfef0
9 changes: 5 additions & 4 deletions stdlib/tty.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ if sys.platform != "win32":
__all__ = ["setraw", "setcbreak"]
if sys.version_info >= (3, 12):
__all__ += ["cfmakeraw", "cfmakecbreak"]
_SetReturn: TypeAlias = _AttrReturn

_ModeSetterReturn: TypeAlias = _AttrReturn
else:
_SetReturn: TypeAlias = None
_ModeSetterReturn: TypeAlias = None

_FD: TypeAlias = int | IO[str]

Expand All @@ -21,8 +22,8 @@ if sys.platform != "win32":
ISPEED: int
OSPEED: int
CC: int
def setraw(fd: _FD, when: int = 2) -> _SetReturn: ...
def setcbreak(fd: _FD, when: int = 2) -> _SetReturn: ...
def setraw(fd: _FD, when: int = 2) -> _ModeSetterReturn: ...
def setcbreak(fd: _FD, when: int = 2) -> _ModeSetterReturn: ...

if sys.version_info >= (3, 12):
# It is: `list[int, int, int, int, int, int, list[str]]
Expand Down