aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules/gnome.py
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2022-03-22 20:28:59 -0400
committerEli Schwartz <eschwartz@archlinux.org>2022-03-29 16:44:54 -0400
commitc9938f8f60c0b7cca7a5668807b17badb7861c86 (patch)
tree6bbdb301a2c8ce4b92866a04703ada96241683b4 /mesonbuild/modules/gnome.py
parent05cfe756f1c2dbd212aa6d30a3879cfe47a7f2fd (diff)
downloadmeson-c9938f8f60c0b7cca7a5668807b17badb7861c86.zip
meson-c9938f8f60c0b7cca7a5668807b17badb7861c86.tar.gz
meson-c9938f8f60c0b7cca7a5668807b17badb7861c86.tar.bz2
move a bunch of imports into TYPE_CHECKING blocks
These are only used for type checking, so don't bother importing them at runtime. Generally add future annotations at the same time, to make sure that existing uses of these imports don't need to be quoted.
Diffstat (limited to 'mesonbuild/modules/gnome.py')
-rw-r--r--mesonbuild/modules/gnome.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
index 484938e..5376d00 100644
--- a/mesonbuild/modules/gnome.py
+++ b/mesonbuild/modules/gnome.py
@@ -14,6 +14,7 @@
'''This module provides helper functions for Gnome/GLib related
functionality such as gobject-introspection, gresources and gtk-doc'''
+from __future__ import annotations
import copy
import itertools
@@ -30,7 +31,7 @@ from .. import build
from .. import interpreter
from .. import mesonlib
from .. import mlog
-from ..build import BuildTarget, CustomTarget, CustomTargetIndex, Executable, GeneratedList, InvalidArguments
+from ..build import CustomTarget, CustomTargetIndex, Executable, GeneratedList, InvalidArguments
from ..dependencies import Dependency, PkgConfigDependency, InternalDependency
from ..interpreter.type_checking import DEPENDS_KW, DEPEND_FILES_KW, INSTALL_KW, NoneType, in_set_validator
from ..interpreterbase import noPosargs, noKwargs, FeatureNew, FeatureDeprecated
@@ -46,6 +47,7 @@ if T.TYPE_CHECKING:
from typing_extensions import Literal, TypedDict
from . import ModuleState
+ from ..build import BuildTarget
from ..compilers import Compiler
from ..interpreter import Interpreter
from ..interpreterbase import TYPE_var, TYPE_kwargs