From c9938f8f60c0b7cca7a5668807b17badb7861c86 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Tue, 22 Mar 2022 20:28:59 -0400 Subject: 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. --- mesonbuild/modules/fs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mesonbuild/modules/fs.py') diff --git a/mesonbuild/modules/fs.py b/mesonbuild/modules/fs.py index 5faee83..d0f5e2e 100644 --- a/mesonbuild/modules/fs.py +++ b/mesonbuild/modules/fs.py @@ -21,7 +21,6 @@ from .. import mlog from . import ExtensionModule from ..mesonlib import ( File, - FileOrString, MesonException, path_is_in_root, ) @@ -30,6 +29,7 @@ from ..interpreterbase import FeatureNew, KwargInfo, typed_kwargs, typed_pos_arg if T.TYPE_CHECKING: from . import ModuleState from ..interpreter import Interpreter + from ..mesonlib import FileOrString from typing_extensions import TypedDict -- cgit v1.1