Annotate sys.platform as LiteralString (#13378)

This commit is contained in:
David Peter
2025-01-09 18:58:44 +01:00
committed by GitHub
parent e3e5971fe7
commit 614e9499f1

View File

@@ -6,7 +6,7 @@ from collections.abc import AsyncGenerator, Callable, Sequence
from io import TextIOWrapper
from types import FrameType, ModuleType, TracebackType
from typing import Any, Final, Literal, NoReturn, Protocol, TextIO, TypeVar, final, type_check_only
from typing_extensions import TypeAlias
from typing_extensions import LiteralString, TypeAlias
_T = TypeVar("_T")
@@ -45,7 +45,7 @@ if sys.version_info >= (3, 10):
path: list[str]
path_hooks: list[Callable[[str], PathEntryFinderProtocol]]
path_importer_cache: dict[str, PathEntryFinderProtocol | None]
platform: str
platform: LiteralString
if sys.version_info >= (3, 9):
platlibdir: str
prefix: str