From a49cd00d644c8adce974175850c047056d578b05 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Fri, 10 Jun 2022 00:29:27 -0400 Subject: treewide: various cleanups to move imports for mypy into typechecking blocks Along the way, add __future__ annotations where lacking. --- mesonbuild/compilers/rust.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'mesonbuild/compilers') diff --git a/mesonbuild/compilers/rust.py b/mesonbuild/compilers/rust.py index 0967ada..296c539 100644 --- a/mesonbuild/compilers/rust.py +++ b/mesonbuild/compilers/rust.py @@ -11,16 +11,14 @@ # 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 import subprocess, os.path import textwrap import typing as T from .. import coredata -from ..mesonlib import ( - EnvironmentException, MachineChoice, MesonException, Popen_safe, - OptionKey, -) +from ..mesonlib import EnvironmentException, MesonException, Popen_safe, OptionKey from .compilers import Compiler, rust_buildtype_args, clike_debug_args if T.TYPE_CHECKING: @@ -28,6 +26,7 @@ if T.TYPE_CHECKING: from ..envconfig import MachineInfo from ..environment import Environment # noqa: F401 from ..linkers import DynamicLinker + from ..mesonlib import MachineChoice from ..programs import ExternalProgram -- cgit v1.1