1
1
__all__ = ["copy" , "paste" , "set_clipboard" , "determine_clipboard" ]
2
2
3
3
from collections .abc import Callable
4
- from typing import Any , Literal , Protocol
4
+ from typing import Literal
5
5
from typing_extensions import TypeAlias
6
6
7
7
class PyperclipException (RuntimeError ): ...
@@ -11,15 +11,6 @@ class PyperclipWindowsException(PyperclipException):
11
11
12
12
class PyperclipTimeoutException (PyperclipException ): ...
13
13
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
-
23
14
_ClipboardMechanismName : TypeAlias = Literal [
24
15
"pbcopy" , "pyobjc" , "qt" , "xclip" , "xsel" , "wl-clipboard" , "klipper" , "windows" , "no"
25
16
]
@@ -30,3 +21,4 @@ def copy(text: str) -> None: ...
30
21
def paste () -> str : ...
31
22
def set_clipboard (clipboard : _ClipboardMechanismName ) -> None : ...
32
23
def determine_clipboard () -> tuple [_ClipboardCopyMechanism , _ClipboardPasteMechanism ]: ...
24
+ def is_available () -> bool : ...
0 commit comments