From d6074d73ceb1ee9b9cc21318fd14de77636c9085 Mon Sep 17 00:00:00 2001 From: MomIsBestFriend <50263213+MomIsBestFriend@users.noreply.github.com> Date: Wed, 27 Nov 2019 21:04:47 +0200 Subject: [PATCH] Update __init__.py --- pandas/io/clipboard/__init__.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pandas/io/clipboard/__init__.py b/pandas/io/clipboard/__init__.py index 6e560dc7b43eb8..3f65c9a1a517ce 100644 --- a/pandas/io/clipboard/__init__.py +++ b/pandas/io/clipboard/__init__.py @@ -91,7 +91,7 @@ def __init__(self, message): super().__init__(message) -def _stringifyText(text): +def _stringifyText(text) -> str: acceptedTypes = (str, int, float, bool) if not isinstance(text, acceptedTypes): raise PyperclipException( @@ -156,7 +156,7 @@ def copy_qt(text): cb = app.clipboard() cb.setText(text) - def paste_qt(): + def paste_qt() -> str: cb = app.clipboard() return str(cb.text()) @@ -273,7 +273,7 @@ def copy_dev_clipboard(text): with open("/dev/clipboard", "wt") as fo: fo.write(text) - def paste_dev_clipboard(): + def paste_dev_clipboard() -> str: with open("/dev/clipboard", "rt") as fo: content = fo.read() return content @@ -286,7 +286,7 @@ class ClipboardUnavailable: def __call__(self, *args, **kwargs): raise PyperclipException(EXCEPT_MSG) - def __bool__(self): + def __bool__(self) -> bool: return False return ClipboardUnavailable(), ClipboardUnavailable() @@ -650,7 +650,7 @@ def lazy_load_stub_paste(): return paste() -def is_available(): +def is_available() -> bool: return copy != lazy_load_stub_copy and paste != lazy_load_stub_paste