From 4cfddd1fe62f8dcd39e37b80ece88e30cc440687 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Sun, 23 Aug 2020 21:22:01 -0700 Subject: compilers/mixins/ccrx: make mypy safe --- mesonbuild/compilers/mixins/ccrx.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'mesonbuild') diff --git a/mesonbuild/compilers/mixins/ccrx.py b/mesonbuild/compilers/mixins/ccrx.py index b859215..4ac815a 100644 --- a/mesonbuild/compilers/mixins/ccrx.py +++ b/mesonbuild/compilers/mixins/ccrx.py @@ -47,7 +47,12 @@ ccrx_debug_args = { class CcrxCompiler: - def __init__(self): + + if T.TYPE_CHECKING: + is_cross = True + can_compile_suffixes = set() # type: T.Set[str] + + def __init__(self) -> None: if not self.is_cross: raise EnvironmentException('ccrx supports only cross-compilation.') self.id = 'ccrx' -- cgit v1.1