diff options
author | Michael Hirsch, Ph.D <scivision@users.noreply.github.com> | 2020-05-13 01:19:11 -0400 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2020-05-27 20:24:21 +0300 |
commit | e2c475939eca7d49b9039be3c0a565c0e38c32ac (patch) | |
tree | eedd878a0e327b9d4affd5d0b29ef8903f2b6af0 /mesonbuild/compilers/compilers.py | |
parent | a340b413ef7f25d458806f92d342e52a7356dc01 (diff) | |
download | meson-e2c475939eca7d49b9039be3c0a565c0e38c32ac.zip meson-e2c475939eca7d49b9039be3c0a565c0e38c32ac.tar.gz meson-e2c475939eca7d49b9039be3c0a565c0e38c32ac.tar.bz2 |
add type anno: compilers/clike
Diffstat (limited to 'mesonbuild/compilers/compilers.py')
-rw-r--r-- | mesonbuild/compilers/compilers.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py index 3def159..b0fa5f5 100644 --- a/mesonbuild/compilers/compilers.py +++ b/mesonbuild/compilers/compilers.py @@ -494,7 +494,7 @@ class CompilerArgs(collections.abc.MutableSequence): value = self.__container[index] del self.__container[index] if value in self.__seen_args and value in self.__container: # this is also honoring that you can have duplicated entries - self.__seen_args.remove(value) + self.__seen_args.remove(value) def __len__(self) -> int: return len(self.__container) @@ -688,7 +688,7 @@ class CompilerArgs(collections.abc.MutableSequence): should_prepend = self._should_prepend(arg) if dedup == 2: # Remove all previous occurrences of the arg and add it anew - if arg in self.__seen_args and arg not in this_round_added: #if __seen_args contains arg as well as this_round_added, then its not yet part in self. + if arg in self.__seen_args and arg not in this_round_added: # if __seen_args contains arg as well as this_round_added, then its not yet part in self. self.remove(arg) if should_prepend: if arg in pre: @@ -954,7 +954,7 @@ class Compiler: return args @contextlib.contextmanager - def compile(self, code, extra_args=None, *, mode='link', want_output=False, temp_dir=None): + def compile(self, code: str, extra_args: list = None, *, mode: str = 'link', want_output: bool = False, temp_dir: str = None): if extra_args is None: extra_args = [] try: |