mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Use _typeshed.FileDescriptorOrPath in stubs (#9695)
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
from _typeshed import FileDescriptor, StrOrBytesPath
|
||||
from collections.abc import Callable
|
||||
from typing import TypeVar
|
||||
from typing_extensions import TypeAlias
|
||||
@@ -9,4 +8,3 @@ from Xlib.protocol.rq import Request
|
||||
_T = TypeVar("_T")
|
||||
ErrorHandler: TypeAlias = Callable[[XError, Request | None], _T]
|
||||
Unused: TypeAlias = object
|
||||
OpenFile: TypeAlias = StrOrBytesPath | FileDescriptor
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from Xlib._typing import OpenFile
|
||||
from _typeshed import FileDescriptorOrPath
|
||||
|
||||
FamilyInternet: int
|
||||
FamilyDECnet: int
|
||||
@@ -9,7 +9,7 @@ FamilyLocal: int
|
||||
|
||||
class Xauthority:
|
||||
entries: list[tuple[bytes, bytes, bytes, bytes, bytes]]
|
||||
def __init__(self, filename: OpenFile | None = ...) -> None: ...
|
||||
def __init__(self, filename: FileDescriptorOrPath | None = ...) -> None: ...
|
||||
def __len__(self) -> int: ...
|
||||
def __getitem__(self, i: int) -> tuple[bytes, bytes, bytes, bytes, bytes]: ...
|
||||
def get_best_auth(
|
||||
|
||||
Reference in New Issue
Block a user