aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2021-12-04 21:18:03 -0800
committerEli Schwartz <eschwartz93@gmail.com>2022-01-18 21:58:24 -0500
commit41fe51b36ee99c5b943b5a2bb371ea73b548da0e (patch)
treea29ecebfab34ef1c48ec08f8b6fde80c5a9be1b1
parent4048c71d6dd175bd4242c109fbdc54d6867e0da4 (diff)
downloadmeson-41fe51b36ee99c5b943b5a2bb371ea73b548da0e.zip
meson-41fe51b36ee99c5b943b5a2bb371ea73b548da0e.tar.gz
meson-41fe51b36ee99c5b943b5a2bb371ea73b548da0e.tar.bz2
modules/gnome: ignore the return type of _get_dep
This is hard to fix, and it's really doing something bad anyway. But we know it's right, so just tell mypy to not worry about it.
-rw-r--r--mesonbuild/modules/gnome.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
index eb4f395..f2a863c 100644
--- a/mesonbuild/modules/gnome.py
+++ b/mesonbuild/modules/gnome.py
@@ -310,7 +310,10 @@ class GnomeModule(ExtensionModule):
def _get_dep(self, state: 'ModuleState', depname: str, native: bool = False,
required: bool = True) -> Dependency:
kwargs = {'native': native, 'required': required}
- return self.interpreter.func_dependency(state.current_node, [depname], kwargs)
+ # FIXME: Even if we fix the function, mypy still can't figure out what's
+ # going on here. And we really dont want to call interpreter
+ # implementations of meson functions anyway.
+ return self.interpreter.func_dependency(state.current_node, [depname], kwargs) # type: ignore
def _get_native_binary(self, state: 'ModuleState', name: str, depname: str,
varname: str, required: bool = True) -> T.Union[ExternalProgram, OverrideProgram, 'build.Executable']:
@@ -1048,7 +1051,7 @@ class GnomeModule(ExtensionModule):
srcdir = os.path.join(state.environment.get_source_dir(), state.subdir)
builddir = os.path.join(state.environment.get_build_dir(), state.subdir)
- depends: T.List[T.Union['FileOrString', build.GeneratedTypes, build.Executable, build.SharedLibrary, build.StaticLibrary]] = []
+ depends: T.List[T.Union['FileOrString', 'build.GeneratedTypes', build.BuildTarget]] = []
depends.extend(gir_dep.sources)
depends.extend(girtargets)