diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2022-06-14 00:42:26 -0400 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2022-07-03 14:11:31 -0400 |
commit | 0703ee0aef68e235c1e22d6448b79dfbbb5c8039 (patch) | |
tree | 0f7ba031362d926b726852d2070ecc8377bdb5bd /mesonbuild/mintro.py | |
parent | 46148f923b196e1b1d004e68d43edc2daca4dd25 (diff) | |
download | meson-0703ee0aef68e235c1e22d6448b79dfbbb5c8039.zip meson-0703ee0aef68e235c1e22d6448b79dfbbb5c8039.tar.gz meson-0703ee0aef68e235c1e22d6448b79dfbbb5c8039.tar.bz2 |
move various unused typing-only imports into type-checking blocks
Diffstat (limited to 'mesonbuild/mintro.py')
-rw-r--r-- | mesonbuild/mintro.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/mesonbuild/mintro.py b/mesonbuild/mintro.py index 5421af3..eee2e7c 100644 --- a/mesonbuild/mintro.py +++ b/mesonbuild/mintro.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations """This is a helper script for IDE developers. It allows you to extract information such as list of targets, files, compiler flags, @@ -19,7 +20,6 @@ tests and so on. All output is in JSON for simple parsing. Currently only works for the Ninja backend. Others use generated project files and don't need this info.""" -import argparse import collections import json import os @@ -29,9 +29,14 @@ import typing as T from . import build, mesonlib, mlog, coredata as cdata from .ast import IntrospectionInterpreter, BUILD_TARGET_FUNCTIONS, AstConditionLevel, AstIDGenerator, AstIndentationGenerator, AstJSONPrinter from .backend import backends -from .interpreter import Interpreter from .mesonlib import OptionKey -from .mparser import BaseNode, FunctionNode, ArrayNode, ArgumentNode, StringNode +from .mparser import FunctionNode, ArrayNode, ArgumentNode, StringNode + +if T.TYPE_CHECKING: + import argparse + + from .interpreter import Interpreter + from .mparser import BaseNode def get_meson_info_file(info_dir: str) -> str: return os.path.join(info_dir, 'meson-info.json') |