diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2022-04-07 22:54:55 -0400 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2022-05-23 16:44:08 -0400 |
commit | 1c52ac4e156c2f21d44cf800b112c5ea26878185 (patch) | |
tree | 73e782aab6354ed731174100593577d105eea23f /mesonbuild/compilers | |
parent | e5c7dc199a849c2d548e41900f560f554fe5665d (diff) | |
download | meson-1c52ac4e156c2f21d44cf800b112c5ea26878185.zip meson-1c52ac4e156c2f21d44cf800b112c5ea26878185.tar.gz meson-1c52ac4e156c2f21d44cf800b112c5ea26878185.tar.bz2 |
move various imports into TYPE_CHECKING blocks for neatness
Diffstat (limited to 'mesonbuild/compilers')
-rw-r--r-- | mesonbuild/compilers/detect.py | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/mesonbuild/compilers/detect.py b/mesonbuild/compilers/detect.py index 74f2f17..05ae86f 100644 --- a/mesonbuild/compilers/detect.py +++ b/mesonbuild/compilers/detect.py @@ -11,9 +11,10 @@ # 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 from ..mesonlib import ( - MachineChoice, MesonException, EnvironmentException, + MesonException, EnvironmentException, search_version, is_windows, Popen_safe, windows_proof_rm, ) from ..envconfig import BinaryTable @@ -40,7 +41,6 @@ from ..linkers import ( NvidiaHPC_DynamicLinker, PGIDynamicLinker, PGIStaticLinker, - StaticLinker, Xc16Linker, Xc16DynamicLinker, XilinkDynamicLinker, @@ -50,9 +50,7 @@ from ..linkers import ( VisualStudioLikeLinkerMixin, WASMDynamicLinker, ) -from .compilers import Compiler from .c import ( - CCompiler, AppleClangCCompiler, ArmCCompiler, ArmclangCCompiler, @@ -74,7 +72,6 @@ from .c import ( VisualStudioCCompiler, ) from .cpp import ( - CPPCompiler, AppleClangCPPCompiler, ArmCPPCompiler, ArmclangCPPCompiler, @@ -102,7 +99,6 @@ from .d import ( ) from .cuda import CudaCompiler from .fortran import ( - FortranCompiler, ArmLtdFlangFortranCompiler, G95FortranCompiler, GnuFortranCompiler, @@ -119,13 +115,11 @@ from .fortran import ( ) from .java import JavaCompiler from .objc import ( - ObjCCompiler, AppleClangObjCCompiler, ClangObjCCompiler, GnuObjCCompiler, ) from .objcpp import ( - ObjCPPCompiler, AppleClangObjCPPCompiler, ClangObjCPPCompiler, GnuObjCPPCompiler, @@ -147,7 +141,15 @@ import os import typing as T if T.TYPE_CHECKING: + from .compilers import Compiler + from .c import CCompiler + from .cpp import CPPCompiler + from .fortran import FortranCompiler + from .objc import ObjCCompiler + from .objcpp import ObjCPPCompiler + from ..linkers import StaticLinker from ..environment import Environment + from ..mesonlib import MachineChoice from ..programs import ExternalProgram |