diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2022-06-12 22:39:31 -0400 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2022-07-03 14:11:30 -0400 |
commit | 075ccc68bec1f3eb74e2089950b48627811354ac (patch) | |
tree | 8de7e084d3ca50369230369cb2de3cf086d78cd6 /mesonbuild | |
parent | 44c95087d05f93558d60113187d35a2f251e2a77 (diff) | |
download | meson-075ccc68bec1f3eb74e2089950b48627811354ac.zip meson-075ccc68bec1f3eb74e2089950b48627811354ac.tar.gz meson-075ccc68bec1f3eb74e2089950b48627811354ac.tar.bz2 |
sort imports for neatness
Diffstat (limited to 'mesonbuild')
-rw-r--r-- | mesonbuild/ast/interpreter.py | 7 | ||||
-rw-r--r-- | mesonbuild/cmake/interpreter.py | 12 | ||||
-rw-r--r-- | mesonbuild/mintro.py | 16 |
3 files changed, 17 insertions, 18 deletions
diff --git a/mesonbuild/ast/interpreter.py b/mesonbuild/ast/interpreter.py index 2e18a6a..63eb3e2 100644 --- a/mesonbuild/ast/interpreter.py +++ b/mesonbuild/ast/interpreter.py @@ -15,6 +15,10 @@ # This class contains the basic functionality needed to run any interpreter # or an interpreter-based tool. +import os +import sys +import typing as T + from .visitor import AstVisitor from .. import mparser, mesonlib from .. import environment @@ -60,9 +64,6 @@ from ..mparser import ( UMinusNode, ) -import os, sys -import typing as T - if T.TYPE_CHECKING: from ..interpreter import Interpreter diff --git a/mesonbuild/cmake/interpreter.py b/mesonbuild/cmake/interpreter.py index 8706bb4..2d88079 100644 --- a/mesonbuild/cmake/interpreter.py +++ b/mesonbuild/cmake/interpreter.py @@ -15,6 +15,12 @@ # This class contains the basic functionality needed to run any interpreter # or an interpreter-based tool. +from functools import lru_cache +from os import environ +from pathlib import Path +import re +import typing as T + from .common import CMakeException, CMakeTarget, TargetOptions, CMakeConfiguration, language_map, cmake_get_generator_args, check_cmake_args from .fileapi import CMakeFileAPI from .executor import CMakeExecutor @@ -27,12 +33,6 @@ from ..mesondata import DataFile from ..compilers.compilers import assembler_suffixes, lang_suffixes, header_suffixes, obj_suffixes, lib_suffixes, is_header from ..programs import ExternalProgram from ..coredata import FORBIDDEN_TARGET_NAMES -from functools import lru_cache -from pathlib import Path -import typing as T -import re -from os import environ - from ..mparser import ( Token, BaseNode, diff --git a/mesonbuild/mintro.py b/mesonbuild/mintro.py index e83c08b..5421af3 100644 --- a/mesonbuild/mintro.py +++ b/mesonbuild/mintro.py @@ -19,21 +19,19 @@ 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 -from . import build, coredata as cdata -from . import mesonlib -from .ast import IntrospectionInterpreter, BUILD_TARGET_FUNCTIONS, AstConditionLevel, AstIDGenerator, AstIndentationGenerator, AstJSONPrinter -from . import mlog -from .backend import backends -from .mparser import BaseNode, FunctionNode, ArrayNode, ArgumentNode, StringNode -from .interpreter import Interpreter +import os from pathlib import Path, PurePath import typing as T -import os -import argparse +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 def get_meson_info_file(info_dir: str) -> str: return os.path.join(info_dir, 'meson-info.json') |