diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2022-03-22 20:28:59 -0400 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2022-03-29 16:44:54 -0400 |
commit | c9938f8f60c0b7cca7a5668807b17badb7861c86 (patch) | |
tree | 6bbdb301a2c8ce4b92866a04703ada96241683b4 /mesonbuild/interpreter/interpreterobjects.py | |
parent | 05cfe756f1c2dbd212aa6d30a3879cfe47a7f2fd (diff) | |
download | meson-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/interpreter/interpreterobjects.py')
-rw-r--r-- | mesonbuild/interpreter/interpreterobjects.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mesonbuild/interpreter/interpreterobjects.py b/mesonbuild/interpreter/interpreterobjects.py index bf668f3..6cc636b 100644 --- a/mesonbuild/interpreter/interpreterobjects.py +++ b/mesonbuild/interpreter/interpreterobjects.py @@ -16,10 +16,10 @@ from ..modules import ModuleReturnValue, ModuleObject, ModuleState, ExtensionMod from ..backend.backends import TestProtocol from ..interpreterbase import ( ContainerTypeInfo, KwargInfo, MesonOperator, - InterpreterObject, MesonInterpreterObject, ObjectHolder, MutableInterpreterObject, - FeatureCheckBase, FeatureNew, FeatureDeprecated, + MesonInterpreterObject, ObjectHolder, MutableInterpreterObject, + FeatureNew, FeatureDeprecated, typed_pos_args, typed_kwargs, typed_operator, - noArgsFlattening, noPosargs, noKwargs, unholder_return, TYPE_var, TYPE_kwargs, TYPE_nvar, TYPE_nkwargs, + noArgsFlattening, noPosargs, noKwargs, unholder_return, flatten, resolve_second_level_holders, InterpreterException, InvalidArguments, InvalidCode) from ..interpreter.type_checking import NoneType, ENV_SEPARATOR_KW from ..dependencies import Dependency, ExternalLibrary, InternalDependency @@ -32,7 +32,7 @@ if T.TYPE_CHECKING: from . import kwargs from ..cmake.interpreter import CMakeInterpreter from ..envconfig import MachineInfo - from ..interpreterbase import SubProject + from ..interpreterbase import FeatureCheckBase, InterpreterObject, SubProject, TYPE_var, TYPE_kwargs, TYPE_nvar, TYPE_nkwargs from .interpreter import Interpreter from typing_extensions import TypedDict |