diff --git a/libqtile/utils.py b/libqtile/utils.py index 968abb8c05..01323012bc 100644 --- a/libqtile/utils.py +++ b/libqtile/utils.py @@ -31,15 +31,7 @@ from pathlib import Path from random import randint from shutil import which -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from typing import Any, Callable, Coroutine, TypeVar, Union - - ColorType = Union[str, tuple[int, int, int], tuple[int, int, int, float]] - ColorsType = Union[ColorType, list[ColorType]] - - T = TypeVar("T") +from typing import TYPE_CHECKING, Union try: from dbus_next import AuthError, Message, Variant @@ -52,6 +44,14 @@ from libqtile.log_utils import logger +ColorType = Union[str, tuple[int, int, int], tuple[int, int, int, float]] +if TYPE_CHECKING: + from typing import Any, Callable, Coroutine, TypeVar + + ColorsType = Union[ColorType, list[ColorType]] + + T = TypeVar("T") + dbus_bus_connections = set() # Create a list to collect references to tasks so they're not garbage collected