Skip to content

Commit b49b32a

Browse files
author
Xiddoc
committed
Drop stubs for CheckedCall and added is_available
1 parent f43297d commit b49b32a

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed
Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
__all__ = ["copy", "paste", "set_clipboard", "determine_clipboard"]
22

33
from collections.abc import Callable
4-
from typing import Any, Literal, Protocol
4+
from typing import Literal
55
from typing_extensions import TypeAlias
66

77
class PyperclipException(RuntimeError): ...
@@ -11,15 +11,6 @@ class PyperclipWindowsException(PyperclipException):
1111

1212
class PyperclipTimeoutException(PyperclipException): ...
1313

14-
class _WinDLLUser32Function(Protocol):
15-
def __call__(self, *args: Any) -> Any: ...
16-
17-
# Wrapper for ctypes calls, should not be exposed to the developer
18-
class CheckedCall:
19-
def __init__(self, f: _WinDLLUser32Function) -> None: ...
20-
def __call__(self, *args: Any) -> Any: ...
21-
def __setattr__(self, key: str, value: Any) -> None: ...
22-
2314
_ClipboardMechanismName: TypeAlias = Literal[
2415
"pbcopy", "pyobjc", "qt", "xclip", "xsel", "wl-clipboard", "klipper", "windows", "no"
2516
]
@@ -30,3 +21,4 @@ def copy(text: str) -> None: ...
3021
def paste() -> str: ...
3122
def set_clipboard(clipboard: _ClipboardMechanismName) -> None: ...
3223
def determine_clipboard() -> tuple[_ClipboardCopyMechanism, _ClipboardPasteMechanism]: ...
24+
def is_available() -> bool: ...

0 commit comments

Comments
 (0)