@@ -91,7 +91,7 @@ def __init__(self, message):
91
91
super ().__init__ (message )
92
92
93
93
94
- def _stringifyText (text ):
94
+ def _stringifyText (text ) -> str :
95
95
acceptedTypes = (str , int , float , bool )
96
96
if not isinstance (text , acceptedTypes ):
97
97
raise PyperclipException (
@@ -156,7 +156,7 @@ def copy_qt(text):
156
156
cb = app .clipboard ()
157
157
cb .setText (text )
158
158
159
- def paste_qt ():
159
+ def paste_qt () -> str :
160
160
cb = app .clipboard ()
161
161
return str (cb .text ())
162
162
@@ -273,7 +273,7 @@ def copy_dev_clipboard(text):
273
273
with open ("/dev/clipboard" , "wt" ) as fo :
274
274
fo .write (text )
275
275
276
- def paste_dev_clipboard ():
276
+ def paste_dev_clipboard () -> str :
277
277
with open ("/dev/clipboard" , "rt" ) as fo :
278
278
content = fo .read ()
279
279
return content
@@ -286,7 +286,7 @@ class ClipboardUnavailable:
286
286
def __call__ (self , * args , ** kwargs ):
287
287
raise PyperclipException (EXCEPT_MSG )
288
288
289
- def __bool__ (self ):
289
+ def __bool__ (self ) -> bool :
290
290
return False
291
291
292
292
return ClipboardUnavailable (), ClipboardUnavailable ()
@@ -650,7 +650,7 @@ def lazy_load_stub_paste():
650
650
return paste ()
651
651
652
652
653
- def is_available ():
653
+ def is_available () -> bool :
654
654
return copy != lazy_load_stub_copy and paste != lazy_load_stub_paste
655
655
656
656
0 commit comments