Skip to content

Commit

Permalink
chore: fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
AceofSpades5757 committed May 1, 2024
1 parent 89ab89c commit e84cc76
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/clipboard/clipboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ def get_clipboard(
format = available[0]
with Clipboard() as cb:
return cb.get_clipboard(format=format)
return None


def set_clipboard(
Expand Down Expand Up @@ -288,7 +289,6 @@ def _set_clipboard(
content_bytes: bytes
contents_ptr: LPVOID
if format == ClipboardFormat.CF_UNICODETEXT.value:
content_bytes: bytes
if isinstance(content, str):
content_bytes = content.encode(encoding=UTF_ENCODING)
else:
Expand Down Expand Up @@ -328,7 +328,6 @@ def _set_clipboard(

set_handle = SetClipboardData(format, alloc_handle)
else:
content_bytes: bytes
if isinstance(content, str):
# Most general content is going to be utf-8.
content_bytes = content.encode(encoding="utf-8")
Expand Down Expand Up @@ -516,3 +515,5 @@ def _empty(self) -> bool:
return bool(EmptyClipboard())
else:
raise EmptyClipboardError("Emptying the clipboard failed.")

return False

0 comments on commit e84cc76

Please sign in to comment.