aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesonbuild/compilers/mixins/clike.py2
-rw-r--r--mesonbuild/mesonlib/universal.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/compilers/mixins/clike.py b/mesonbuild/compilers/mixins/clike.py
index 3d2df9b..269ce5c 100644
--- a/mesonbuild/compilers/mixins/clike.py
+++ b/mesonbuild/compilers/mixins/clike.py
@@ -437,7 +437,7 @@ class CLikeCompiler(Compiler):
dependencies = []
elif not isinstance(dependencies, collections.abc.Iterable):
# TODO: we want to ensure the front end does the listifing here
- dependencies = [dependencies] # type: ignore
+ dependencies = [dependencies]
# Collect compiler arguments
cargs = self.compiler_args() # type: arglist.CompilerArgs
largs = [] # type: T.List[str]
diff --git a/mesonbuild/mesonlib/universal.py b/mesonbuild/mesonlib/universal.py
index 53e9514..bae80d4 100644
--- a/mesonbuild/mesonlib/universal.py
+++ b/mesonbuild/mesonlib/universal.py
@@ -1319,11 +1319,11 @@ def extract_as_list(dict_object: T.Dict[_T, _U], key: _T, pop: bool = False) ->
'''
Extracts all values from given dict_object and listifies them.
'''
- fetch = dict_object.get
+ fetch: T.Callable[[_T], _U] = dict_object.get
if pop:
fetch = dict_object.pop
# If there's only one key, we don't return a list with one element
- return listify(fetch(key, []), flatten=True)
+ return listify(fetch(key) or [], flatten=True)
def typeslistify(item: 'T.Union[_T, T.Sequence[_T]]',