summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2025-09-16 17:43:14 +0200
committerDylan Baker <dylan@pnwbakers.com>2025-09-24 07:48:22 -0700
commitae834a35e44731ff6372ad0e88b81b302bb57983 (patch)
treef5f19d8b0417eafe7dba54eea4139bb64e22782e
parent55c8d6ed4852659e171d06afa5bf14fb619462f7 (diff)
downloadmeson-ae834a35e44731ff6372ad0e88b81b302bb57983.tar.gz
compilers: replace "type: ignore" with assertions
Option values have type "str | int | list[str]", assert that they are strings before passing them to self.get_crt_compile_args(). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--mesonbuild/compilers/mixins/clike.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/mesonbuild/compilers/mixins/clike.py b/mesonbuild/compilers/mixins/clike.py
index d2eb6119b..716d23a0b 100644
--- a/mesonbuild/compilers/mixins/clike.py
+++ b/mesonbuild/compilers/mixins/clike.py
@@ -363,7 +363,9 @@ class CLikeCompiler(Compiler):
try:
crt_val = env.coredata.optstore.get_value('b_vscrt')
buildtype = env.coredata.optstore.get_value('buildtype')
- cargs += self.get_crt_compile_args(crt_val, buildtype) # type: ignore[arg-type]
+ assert isinstance(crt_val, str), 'for mypy'
+ assert isinstance(buildtype, str), 'for mypy'
+ cargs += self.get_crt_compile_args(crt_val, buildtype)
except (KeyError, AttributeError):
pass