mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-06 21:43:59 +08:00
[stdlib][os] Change some str types to LiteralString (#15018)
This commit is contained in:
+14
-13
@@ -41,10 +41,22 @@ from typing import (
|
||||
runtime_checkable,
|
||||
type_check_only,
|
||||
)
|
||||
from typing_extensions import Self, TypeAlias, Unpack, deprecated
|
||||
from typing_extensions import LiteralString, Self, TypeAlias, Unpack, deprecated
|
||||
|
||||
from . import path as _path
|
||||
|
||||
# Re-export common definitions from os.path to reduce duplication
|
||||
from .path import (
|
||||
altsep as altsep,
|
||||
curdir as curdir,
|
||||
defpath as defpath,
|
||||
devnull as devnull,
|
||||
extsep as extsep,
|
||||
pardir as pardir,
|
||||
pathsep as pathsep,
|
||||
sep as sep,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
"F_OK",
|
||||
"O_APPEND",
|
||||
@@ -674,19 +686,8 @@ if sys.platform != "win32":
|
||||
ST_NOSUID: Final[int]
|
||||
ST_RDONLY: Final[int]
|
||||
|
||||
curdir: str
|
||||
pardir: str
|
||||
sep: str
|
||||
if sys.platform == "win32":
|
||||
altsep: str
|
||||
else:
|
||||
altsep: str | None
|
||||
extsep: str
|
||||
pathsep: str
|
||||
defpath: str
|
||||
linesep: Literal["\n", "\r\n"]
|
||||
devnull: str
|
||||
name: str
|
||||
name: LiteralString
|
||||
|
||||
F_OK: Final = 0
|
||||
R_OK: Final = 4
|
||||
|
||||
Reference in New Issue
Block a user