Skip to content
Merged
Changes from all commits
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
27 changes: 14 additions & 13 deletions stdlib/os/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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
Expand Down