diff options
author | Tristan Partin <tristan@partin.io> | 2021-12-29 22:24:19 -0600 |
---|---|---|
committer | Eli Schwartz <eschwartz93@gmail.com> | 2021-12-30 00:53:58 -0500 |
commit | 269337ceb26c8fd1ca2680ee7db9e82fdbf6b25c (patch) | |
tree | 16628a5a9be73d354f39f5afbb35da89acd0d308 /mesonbuild/compilers | |
parent | 37b122b87e716f5a4e909db12a7793d162c599bb (diff) | |
download | meson-269337ceb26c8fd1ca2680ee7db9e82fdbf6b25c.zip meson-269337ceb26c8fd1ca2680ee7db9e82fdbf6b25c.tar.gz meson-269337ceb26c8fd1ca2680ee7db9e82fdbf6b25c.tar.bz2 |
Fix mypy 0.930 issues
Removed errant "type: ignore".
Fixed issue with "fetch" call. This issue was the following:
Dict::get() and Dict::pop() have the following signature:
T.Callable[[_T, _U], _U | None] OR T.Callable[[_T], _U | None]
Note how the return type is _U here. When the fetch() function was
actually being called, it had the following signature:
T.Callable[[_T, T.List[_U]], T.Union[T.List[_U], _U]]
This is incompatible with the previous definitions. The solution is
simply to move where the default value is introduced if fetch() produces
None.
Diffstat (limited to 'mesonbuild/compilers')
-rw-r--r-- | mesonbuild/compilers/mixins/clike.py | 2 |
1 files changed, 1 insertions, 1 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] |