From a6b563abb1571f161e0dde9acf84ab8e03f71a73 Mon Sep 17 00:00:00 2001 From: demberto Date: Mon, 23 May 2022 11:21:09 +0530 Subject: [PATCH] Fixes #101 --- customtkinter/widgets/widget_base_class.py | 7 ++++++- setup.cfg | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/customtkinter/widgets/widget_base_class.py b/customtkinter/widgets/widget_base_class.py index 0f378e9..dd2aa23 100644 --- a/customtkinter/widgets/widget_base_class.py +++ b/customtkinter/widgets/widget_base_class.py @@ -2,7 +2,12 @@ import tkinter import tkinter.ttk as ttk import copy import re -from typing import Callable, Union, TypedDict +from typing import Callable, Union + +try: + from typing import TypedDict +except ImportError: + from typing_extensions import TypedDict from ..windows.ctk_tk import CTk from ..windows.ctk_toplevel import CTkToplevel diff --git a/setup.cfg b/setup.cfg index f192ec7..f7165ef 100644 --- a/setup.cfg +++ b/setup.cfg @@ -20,4 +20,5 @@ packages = customtkinter.windows install_requires = darkdetect + typing_extensions; python_version<="3.7" include_package_data = True