diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2022-03-01 23:55:42 -0500 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2022-03-07 19:09:50 -0500 |
commit | c231c4bd2ad1a9b0ddb00a838c89566bc88d2a8e (patch) | |
tree | e2e782b9d7883b96a1bcecc13ddc51d6656bdf20 /mesonbuild/interpreter/interpreter.py | |
parent | a009eacc65ddb447edcfc9fd317ad828d9b3353a (diff) | |
download | meson-c231c4bd2ad1a9b0ddb00a838c89566bc88d2a8e.zip meson-c231c4bd2ad1a9b0ddb00a838c89566bc88d2a8e.tar.gz meson-c231c4bd2ad1a9b0ddb00a838c89566bc88d2a8e.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/interpreter/interpreter.py')
-rw-r--r-- | mesonbuild/interpreter/interpreter.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py index 8eca0b3..bc238c7 100644 --- a/mesonbuild/interpreter/interpreter.py +++ b/mesonbuild/interpreter/interpreter.py @@ -33,10 +33,9 @@ from ..interpreterbase import InterpreterException, InvalidArguments, InvalidCod from ..interpreterbase import Disabler, disablerIfNotFound from ..interpreterbase import FeatureNew, FeatureDeprecated, FeatureNewKwargs, FeatureDeprecatedKwargs from ..interpreterbase import ObjectHolder -from ..interpreterbase.baseobjects import InterpreterObject, TYPE_var, TYPE_kwargs from ..modules import ExtensionModule, ModuleObject, MutableModuleObject, NewExtensionModule, NotFoundExtensionModule from ..cmake import CMakeInterpreter -from ..backend.backends import Backend, ExecutableSerialisation +from ..backend.backends import ExecutableSerialisation from . import interpreterobjects as OBJ from . import compiler as compilerOBJ @@ -96,6 +95,8 @@ if T.TYPE_CHECKING: from typing_extensions import Literal from . import kwargs + from ..backend.backends import Backend + from ..interpreterbase.baseobjects import InterpreterObject, TYPE_var, TYPE_kwargs from ..programs import OverrideProgram # Input source types passed to Targets |