From f574beffb4d7e26ba21d1bbc5ad6f36a23df0bfc Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Tue, 2 Jul 2019 15:30:12 -0700 Subject: compilers/mixins/elbrus: add type annotations and fix types There is a pretty big error in here, trying to return a tuple comperhension: (a for a in []) is not a tuple, it's a generator. This has profound type annotations: generators don't support most tuple or list methods, and they can only be iterated once. Beyond that tuples are meant for heterogenous types, ie, position matters for types. I've converted the output to a list in all cases. --- mesonbuild/compilers/compilers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mesonbuild/compilers/compilers.py') diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py index 6e914a6..eebb6e6 100644 --- a/mesonbuild/compilers/compilers.py +++ b/mesonbuild/compilers/compilers.py @@ -937,7 +937,7 @@ class Compiler: return () def get_program_dirs(self, *args, **kwargs): - return () + return [] def has_multi_arguments(self, args, env) -> Tuple[bool, bool]: raise EnvironmentException( -- cgit v1.1