From 051e19e9c1e708a35ce8c58c9b641e29974145ff Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Wed, 18 May 2022 22:30:19 +0200 Subject: [PATCH] Core: tkinter import may only be needed for type-info and can be skipped in certain cases for speed of startup --- Utils.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Utils.py b/Utils.py index fb2289d3..12870c8e 100644 --- a/Utils.py +++ b/Utils.py @@ -12,7 +12,11 @@ import io import collections import importlib import logging -from tkinter import Tk + +if typing.TYPE_CHECKING: + from tkinter import Tk +else: + Tk = typing.Any def tuplize_version(version: str) -> Version: