Skip to content

Commit

Permalink
Fix pywin32 GetClipboardData return type (#13046)
Browse files Browse the repository at this point in the history
Fixes #12825
  • Loading branch information
kbaikov authored Nov 20, 2024
1 parent 308a09f commit 1cbfc75
Showing 1 changed file with 26 additions and 24 deletions.
50 changes: 26 additions & 24 deletions stubs/pywin32/win32/win32clipboard.pyi
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
from typing import Any, Final

from win32.lib.pywintypes import error as error

def ChangeClipboardChain(hWndRemove: int, hWndNewNext: int, /): ...
def CloseClipboard(): ...
def CountClipboardFormats(): ...
def EmptyClipboard(): ...
def EnumClipboardFormats(_format: int = ..., /): ...
def GetClipboardData(_format, /) -> str: ...
def GetClipboardData(_format, /) -> Any: ... # str or bytes depending on the dib format
def GetClipboardDataHandle(_format, /): ...
def GetClipboardFormatName(_format, /) -> str: ...
def GetClipboardOwner(): ...
Expand All @@ -21,27 +23,27 @@ def SetClipboardData(_format, hMem, /): ...
def SetClipboardText(text, _format, /): ...
def SetClipboardViewer(hWndNewViewer: int, /) -> int: ...

CF_BITMAP: int
CF_DIB: int
CF_DIBV5: int
CF_DIF: int
CF_DSPBITMAP: int
CF_DSPENHMETAFILE: int
CF_DSPMETAFILEPICT: int
CF_DSPTEXT: int
CF_ENHMETAFILE: int
CF_HDROP: int
CF_LOCALE: int
CF_MAX: int
CF_METAFILEPICT: int
CF_OEMTEXT: int
CF_OWNERDISPLAY: int
CF_PALETTE: int
CF_PENDATA: int
CF_RIFF: int
CF_SYLK: int
CF_TEXT: int
CF_TIFF: int
CF_UNICODETEXT: int
CF_WAVE: int
CF_BITMAP: Final[int]
CF_DIB: Final[int]
CF_DIBV5: Final[int]
CF_DIF: Final[int]
CF_DSPBITMAP: Final[int]
CF_DSPENHMETAFILE: Final[int]
CF_DSPMETAFILEPICT: Final[int]
CF_DSPTEXT: Final[int]
CF_ENHMETAFILE: Final[int]
CF_HDROP: Final[int]
CF_LOCALE: Final[int]
CF_MAX: Final[int]
CF_METAFILEPICT: Final[int]
CF_OEMTEXT: Final[int]
CF_OWNERDISPLAY: Final[int]
CF_PALETTE: Final[int]
CF_PENDATA: Final[int]
CF_RIFF: Final[int]
CF_SYLK: Final[int]
CF_TEXT: Final[int]
CF_TIFF: Final[int]
CF_UNICODETEXT: Final[int]
CF_WAVE: Final[int]
UNICODE: bool

0 comments on commit 1cbfc75

Please sign in to comment.