mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-23 04:11:28 +08:00
Use Final for undocumented constants (#12450)
This commit is contained in:
@@ -2,7 +2,7 @@ import sys
|
||||
from _typeshed import ReadableBuffer, StrOrBytesPath
|
||||
from collections.abc import Callable, Collection, Iterable, Mapping, Sequence
|
||||
from types import TracebackType
|
||||
from typing import IO, Any, AnyStr, Generic, Literal, TypeVar, overload
|
||||
from typing import IO, Any, AnyStr, Final, Generic, Literal, TypeVar, overload
|
||||
from typing_extensions import Self, TypeAlias
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
@@ -74,8 +74,8 @@ _T = TypeVar("_T")
|
||||
|
||||
# These two are private but documented
|
||||
if sys.version_info >= (3, 11):
|
||||
_USE_VFORK: bool
|
||||
_USE_POSIX_SPAWN: bool
|
||||
_USE_VFORK: Final[bool]
|
||||
_USE_POSIX_SPAWN: Final[bool]
|
||||
|
||||
class CompletedProcess(Generic[_T]):
|
||||
# morally: _CMD
|
||||
@@ -1810,9 +1810,9 @@ else:
|
||||
text: bool | None = None,
|
||||
) -> Any: ... # morally: -> str | bytes
|
||||
|
||||
PIPE: int
|
||||
STDOUT: int
|
||||
DEVNULL: int
|
||||
PIPE: Final[int]
|
||||
STDOUT: Final[int]
|
||||
DEVNULL: Final[int]
|
||||
|
||||
class SubprocessError(Exception): ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user