diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2022-09-19 15:17:06 -0400 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2022-09-19 15:19:01 -0400 |
commit | edc3e263693586b69a1e044b66dfdde4f5054362 (patch) | |
tree | 2ed359039367019c994fd5709ca764acbabbba18 /mesonbuild/compilers | |
parent | 8277a1aba85bd61109563736d9fdbc9e06a3be6b (diff) | |
download | meson-edc3e263693586b69a1e044b66dfdde4f5054362.zip meson-edc3e263693586b69a1e044b66dfdde4f5054362.tar.gz meson-edc3e263693586b69a1e044b66dfdde4f5054362.tar.bz2 |
fix odd mypy issue in unreachable code
This used to be fine, until imports were removed from this file. Now a
function annotated as T.NoReturn doesn't actually tell mypy that it
cannot return, though, so we manually do it.
Diffstat (limited to 'mesonbuild/compilers')
-rw-r--r-- | mesonbuild/compilers/detect.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mesonbuild/compilers/detect.py b/mesonbuild/compilers/detect.py index 2fbb215..4414a57 100644 --- a/mesonbuild/compilers/detect.py +++ b/mesonbuild/compilers/detect.py @@ -240,6 +240,7 @@ def detect_static_linker(env: 'Environment', compiler: Compiler) -> StaticLinker if p.returncode == 1 and err.startswith('ar: bad option: --'): # Solaris return linkers.ArLinker(compiler.for_machine, linker) _handle_exceptions(popen_exceptions, trials, 'linker') + raise EnvironmentException('Unreachable code (exception to make mypy happy)') # Compilers |