11__all__ = ["copy" , "paste" , "set_clipboard" , "determine_clipboard" ]
22
33from collections .abc import Callable
4- from typing import Any , Literal , Protocol
4+ from typing import Literal
55from typing_extensions import TypeAlias
66
77class PyperclipException (RuntimeError ): ...
@@ -11,15 +11,6 @@ class PyperclipWindowsException(PyperclipException):
1111
1212class 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: ...
3021def paste () -> str : ...
3122def set_clipboard (clipboard : _ClipboardMechanismName ) -> None : ...
3223def determine_clipboard () -> tuple [_ClipboardCopyMechanism , _ClipboardPasteMechanism ]: ...
24+ def is_available () -> bool : ...
0 commit comments