mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-15 06:22:02 +08:00
Add missing fcntl constants. (#12409)
This commit is contained in:
@@ -44,9 +44,10 @@ if sys.platform != "win32":
|
||||
F_SEAL_SHRINK: int
|
||||
F_SEAL_WRITE: int
|
||||
if sys.version_info >= (3, 9):
|
||||
F_OFD_GETLK: int
|
||||
F_OFD_SETLK: int
|
||||
F_OFD_SETLKW: int
|
||||
F_OFD_GETLK: Final[int]
|
||||
F_OFD_SETLK: Final[int]
|
||||
F_OFD_SETLKW: Final[int]
|
||||
|
||||
if sys.version_info >= (3, 10):
|
||||
F_GETPIPE_SZ: int
|
||||
F_SETPIPE_SZ: int
|
||||
@@ -123,6 +124,18 @@ if sys.platform != "win32":
|
||||
RWH_WRITE_LIFE_LONG: Final = 4
|
||||
RWH_WRITE_LIFE_EXTREME: Final = 5
|
||||
|
||||
if sys.version_info >= (3, 11) and sys.platform == "darwin":
|
||||
F_OFD_SETLK: Final = 90
|
||||
F_OFD_SETLKW: Final = 91
|
||||
F_OFD_GETLK: Final = 92
|
||||
|
||||
if sys.version_info >= (3, 13) and sys.platform != "linux":
|
||||
# OSx and NetBSD
|
||||
F_GETNOSIGPIPE: Final[int]
|
||||
F_SETNOSIGPIPE: Final[int]
|
||||
# OSx and FreeBSD
|
||||
F_RDAHEAD: Final[int]
|
||||
|
||||
@overload
|
||||
def fcntl(fd: FileDescriptorLike, cmd: int, arg: int = 0, /) -> int: ...
|
||||
@overload
|
||||
|
||||
Reference in New Issue
Block a user