mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-28 13:52:12 +08:00
Use Final for Constant Literals in the stdlib (#12332)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
import sys
|
||||
from collections.abc import Callable, Iterable
|
||||
from typing import Literal
|
||||
from typing import Final
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
if sys.platform != "win32":
|
||||
__all__ = ["openpty", "fork", "spawn"]
|
||||
_Reader: TypeAlias = Callable[[int], bytes]
|
||||
|
||||
STDIN_FILENO: Literal[0]
|
||||
STDOUT_FILENO: Literal[1]
|
||||
STDERR_FILENO: Literal[2]
|
||||
STDIN_FILENO: Final = 0
|
||||
STDOUT_FILENO: Final = 1
|
||||
STDERR_FILENO: Final = 2
|
||||
|
||||
CHILD: Literal[0]
|
||||
CHILD: Final = 0
|
||||
def openpty() -> tuple[int, int]: ...
|
||||
def master_open() -> tuple[int, str]: ... # deprecated, use openpty()
|
||||
def slave_open(tty_name: str) -> int: ... # deprecated, use openpty()
|
||||
|
||||
Reference in New Issue
Block a user