fixed support for python3.7 #737

This commit is contained in:
Tom Schimansky 2022-12-06 18:13:59 +01:00
parent a564bc35ef
commit 6a3fa7fa29
3 changed files with 15 additions and 3 deletions

View File

@ -1,6 +1,10 @@
import tkinter
import math
from typing import Union, Tuple, Optional, Literal, Callable
from typing import Union, Tuple, Optional, Callable
try:
from typing import Literal
except ImportError:
from typing_extensions import Literal
from .core_rendering import CTkCanvas
from .theme import ThemeManager

View File

@ -1,5 +1,9 @@
import tkinter
from typing import Union, Tuple, List, Dict, Callable, Optional, Literal
from typing import Union, Tuple, List, Dict, Callable, Optional
try:
from typing import Literal
except ImportError:
from typing_extensions import Literal
from .theme import ThemeManager
from .font import CTkFont

View File

@ -1,6 +1,10 @@
from tkinter.font import Font
import copy
from typing import List, Callable, Tuple, Optional, Literal
from typing import List, Callable, Tuple, Optional
try:
from typing import Literal
except ImportError:
from typing_extensions import Literal
from ..theme import ThemeManager