Skip to content

Commit d36bc70

Browse files
ShaharNavehWillAyd
authored andcommitted
Typing annotations (#29850)
1 parent 6d3a08a commit d36bc70

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pandas/io/clipboard/__init__.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def __init__(self, message):
9191
super().__init__(message)
9292

9393

94-
def _stringifyText(text):
94+
def _stringifyText(text) -> str:
9595
acceptedTypes = (str, int, float, bool)
9696
if not isinstance(text, acceptedTypes):
9797
raise PyperclipException(
@@ -156,7 +156,7 @@ def copy_qt(text):
156156
cb = app.clipboard()
157157
cb.setText(text)
158158

159-
def paste_qt():
159+
def paste_qt() -> str:
160160
cb = app.clipboard()
161161
return str(cb.text())
162162

@@ -273,7 +273,7 @@ def copy_dev_clipboard(text):
273273
with open("/dev/clipboard", "wt") as fo:
274274
fo.write(text)
275275

276-
def paste_dev_clipboard():
276+
def paste_dev_clipboard() -> str:
277277
with open("/dev/clipboard", "rt") as fo:
278278
content = fo.read()
279279
return content
@@ -286,7 +286,7 @@ class ClipboardUnavailable:
286286
def __call__(self, *args, **kwargs):
287287
raise PyperclipException(EXCEPT_MSG)
288288

289-
def __bool__(self):
289+
def __bool__(self) -> bool:
290290
return False
291291

292292
return ClipboardUnavailable(), ClipboardUnavailable()
@@ -650,7 +650,7 @@ def lazy_load_stub_paste():
650650
return paste()
651651

652652

653-
def is_available():
653+
def is_available() -> bool:
654654
return copy != lazy_load_stub_copy and paste != lazy_load_stub_paste
655655

656656

0 commit comments

Comments
 (0)