From 042fac7242f1ca71a27e755212f2f7135837d8e9 Mon Sep 17 00:00:00 2001 From: Tom Schimansky Date: Thu, 8 Dec 2022 10:34:41 +0100 Subject: [PATCH] fix image type hints #795 --- customtkinter/windows/widgets/ctk_button.py | 2 +- customtkinter/windows/widgets/ctk_label.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/customtkinter/windows/widgets/ctk_button.py b/customtkinter/windows/widgets/ctk_button.py index 0cac576..5b5b8f0 100644 --- a/customtkinter/windows/widgets/ctk_button.py +++ b/customtkinter/windows/widgets/ctk_button.py @@ -40,7 +40,7 @@ class CTkButton(CTkBaseClass): text: str = "CTkButton", font: Optional[Union[tuple, CTkFont]] = None, textvariable: Union[tkinter.Variable, None] = None, - image: Union[tkinter.PhotoImage, CTkImage, None] = None, + image: Union[CTkImage, None] = None, state: str = "normal", hover: bool = True, command: Union[Callable[[], None], None] = None, diff --git a/customtkinter/windows/widgets/ctk_label.py b/customtkinter/windows/widgets/ctk_label.py index d6b6984..800c58d 100644 --- a/customtkinter/windows/widgets/ctk_label.py +++ b/customtkinter/windows/widgets/ctk_label.py @@ -32,7 +32,7 @@ class CTkLabel(CTkBaseClass): text: str = "CTkLabel", font: Optional[Union[tuple, CTkFont]] = None, - image: Union[tkinter.PhotoImage, CTkImage, None] = None, + image: Union[CTkImage, None] = None, compound: str = "center", anchor: str = "center", # label anchor: center, n, e, s, w wraplength: int = 0,