10000 [tty] py312: Fix return types of set(raw|cbreak) by srittau · Pull Request #10785 · python/typeshed · GitHub
[go: up one dir, main page]

Skip to content

[tty] py312: Fix return types of set(raw|cbreak) #10785

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 7 commits into from
Sep 28, 2023
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
Return termio._Attr
  • Loading branch information
srittau committed Sep 27, 2023
commit 7413b8a0e869928e79b7910b66239c0035b67eb1
9 changes: 3 additions & 6 deletions stdlib/tty.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import sys
from termios import _AttrReturn
from termios import _Attr, _AttrReturn
from typing import IO, Any
from typing_extensions import TypeAlias

Expand All @@ -26,8 +26,5 @@ if sys.platform != "win32":
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]]
_Mode: TypeAlias = list[Any]

def cfmakeraw(mode: _Mode) -> None: ...
def cfmakecbreak(mode: _Mode) -> None: ...
def cfmakeraw(mode: _Attr) -> None: ...
def cfmakecbreak(mode: _Attr) -> None: ...
0