mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-24 03:51:52 +08:00
Switch to PEP-604 syntax in python2 stubs (#5915)
Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
from _typeshed import FileDescriptorLike
|
||||
from typing import Any, Union
|
||||
from typing import Any
|
||||
|
||||
FASYNC: int
|
||||
FD_CLOEXEC: int
|
||||
@@ -74,9 +74,9 @@ LOCK_WRITE: int
|
||||
|
||||
# TODO All these return either int or bytes depending on the value of
|
||||
# cmd (not on the type of arg).
|
||||
def fcntl(fd: FileDescriptorLike, op: int, arg: Union[int, bytes] = ...) -> Any: ...
|
||||
def fcntl(fd: FileDescriptorLike, op: int, arg: int | bytes = ...) -> Any: ...
|
||||
|
||||
# TODO: arg: int or read-only buffer interface or read-write buffer interface
|
||||
def ioctl(fd: FileDescriptorLike, op: int, arg: Union[int, bytes] = ..., mutate_flag: bool = ...) -> Any: ...
|
||||
def ioctl(fd: FileDescriptorLike, op: int, arg: int | bytes = ..., mutate_flag: bool = ...) -> Any: ...
|
||||
def flock(fd: FileDescriptorLike, op: int) -> None: ...
|
||||
def lockf(fd: FileDescriptorLike, op: int, length: int = ..., start: int = ..., whence: int = ...) -> Any: ...
|
||||
|
||||
Reference in New Issue
Block a user