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/primitives/dict.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/primitives/dict.py')
-rw-r--r-- | mesonbuild/interpreter/primitives/dict.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mesonbuild/interpreter/primitives/dict.py b/mesonbuild/interpreter/primitives/dict.py index 24f4d21..ac7c99b 100644 --- a/mesonbuild/interpreter/primitives/dict.py +++ b/mesonbuild/interpreter/primitives/dict.py @@ -1,5 +1,6 @@ # Copyright 2021 The Meson development team # SPDX-license-identifier: Apache-2.0 +from __future__ import annotations import typing as T @@ -14,7 +15,6 @@ from ...interpreterbase import ( typed_pos_args, TYPE_var, - TYPE_kwargs, InvalidArguments, ) @@ -22,6 +22,7 @@ from ...interpreterbase import ( if T.TYPE_CHECKING: # Object holders need the actual interpreter from ...interpreter import Interpreter + from ...interpreterbase import TYPE_kwargs class DictHolder(ObjectHolder[T.Dict[str, TYPE_var]], IterableObject): def __init__(self, obj: T.Dict[str, TYPE_var], interpreter: 'Interpreter') -> None: |