From 08a46bb6c5aabb7fccafe95afd7b10a75e9f3e07 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Tue, 20 Aug 2024 10:42:11 -0700 Subject: [PATCH] cmake/interpreter: Fix some incorrect and missing annotations --- mesonbuild/cmake/interpreter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mesonbuild/cmake/interpreter.py b/mesonbuild/cmake/interpreter.py index db0fc4b36..b427132f6 100644 --- a/mesonbuild/cmake/interpreter.py +++ b/mesonbuild/cmake/interpreter.py @@ -147,7 +147,7 @@ class OutputTargetMap: if k is not None: self.tgt_map[k] = tgt - def _return_first_valid_key(self, keys: T.List[str]) -> T.Optional[T.Union['ConverterTarget', 'ConverterCustomTarget']]: + def _return_first_valid_key(self, keys: T.List[T.Optional[str]]) -> T.Optional[T.Union['ConverterTarget', 'ConverterCustomTarget']]: for i in keys: if i and i in self.tgt_map: return self.tgt_map[i] @@ -165,7 +165,7 @@ class OutputTargetMap: return tgt def artifact(self, name: str) -> T.Optional[T.Union['ConverterTarget', 'ConverterCustomTarget']]: - keys = [] + keys: T.List[T.Optional[str]] = [] candidates = [name, OutputTargetMap.rm_so_version.sub('', name)] for i in lib_suffixes: if not name.endswith('.' + i):