diff options
author | Michael Hirsch, Ph.D <scivision@users.noreply.github.com> | 2019-06-20 14:07:01 -0400 |
---|---|---|
committer | Michael Hirsch, Ph.D <scivision@users.noreply.github.com> | 2019-06-24 14:06:32 -0400 |
commit | 5b109c9ad27aea39ce49d1da8ef0c957ccaef3b9 (patch) | |
tree | 5c28afec73ad304f9e27e6a873492adb39b94139 /mesonbuild/interpreter.py | |
parent | 59e5ad66f2017e17692d64e2aa7d745ea3fe849d (diff) | |
download | meson-5b109c9ad27aea39ce49d1da8ef0c957ccaef3b9.zip meson-5b109c9ad27aea39ce49d1da8ef0c957ccaef3b9.tar.gz meson-5b109c9ad27aea39ce49d1da8ef0c957ccaef3b9.tar.bz2 |
correct missing argument for IntelClFortranCompiler
ifort passes all tests
cleanup logic
Diffstat (limited to 'mesonbuild/interpreter.py')
-rw-r--r-- | mesonbuild/interpreter.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py index dbe623c..59a3642 100644 --- a/mesonbuild/interpreter.py +++ b/mesonbuild/interpreter.py @@ -40,7 +40,7 @@ from collections import namedtuple from itertools import chain from pathlib import PurePath import functools -import typing +from typing import Sequence, List, Union, Optional, Iterator, Dict, Any import importlib @@ -874,10 +874,10 @@ class RunTargetHolder(InterpreterObject, ObjectHolder): return r.format(self.__class__.__name__, h.get_id(), h.command) class Test(InterpreterObject): - def __init__(self, name: str, project: str, suite: typing.List[str], exe: build.Executable, - depends: typing.List[typing.Union[build.CustomTarget, build.BuildTarget]], - is_parallel: bool, cmd_args: typing.List[str], env: build.EnvironmentVariables, - should_fail: bool, timeout: int, workdir: typing.Optional[str], protocol: str): + def __init__(self, name: str, project: str, suite: List[str], exe: build.Executable, + depends: List[Union[build.CustomTarget, build.BuildTarget]], + is_parallel: bool, cmd_args: List[str], env: build.EnvironmentVariables, + should_fail: bool, timeout: int, workdir: Optional[str], protocol: str): InterpreterObject.__init__(self) self.name = name self.suite = suite @@ -2773,7 +2773,7 @@ external dependencies (including libraries) must go to "dependencies".''') self.validate_arguments(args, 0, []) raise Exception() - def add_languages(self, args, required): + def add_languages(self, args: Sequence[str], required: bool) -> bool: success = self.add_languages_for(args, required, MachineChoice.BUILD) success &= self.add_languages_for(args, required, MachineChoice.HOST) return success @@ -3831,7 +3831,7 @@ different subdirectory. # TODO make cross agnostic, just taking into account for_machine # TODO PerMachine[T], Iterator[T] - def get_argdict_on_crossness(self, dicts_per_machine: PerMachine, kwargs) -> typing.Iterator: + def get_argdict_on_crossness(self, dicts_per_machine: PerMachine, kwargs) -> Iterator: for_native = kwargs.get('native', not self.environment.is_cross_build()) if not isinstance(for_native, bool): raise InterpreterException('Keyword native must be a boolean.') @@ -4218,7 +4218,7 @@ This will become a hard error in the future.''', location=self.current_node) return varname in self.variables @staticmethod - def machine_from_native_kwarg(kwargs: typing.Dict[str, typing.Any]) -> MachineChoice: + def machine_from_native_kwarg(kwargs: Dict[str, Any]) -> MachineChoice: native = kwargs.get('native', False) if not isinstance(native, bool): raise InvalidArguments('Argument to "native" must be a boolean.') |