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.
pull/10810/head
Eli Schwartz 2 years ago
parent 8277a1aba8
commit edc3e26369
No known key found for this signature in database
GPG Key ID: CEB167EFB5722BD6
  1. 1
      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

Loading…
Cancel
Save