diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2020-06-08 13:47:33 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2020-06-12 11:16:24 -0700 |
commit | 36d4ccaf806660f1a65a959e88e228bd3f5fb746 (patch) | |
tree | cfec643c4b6c64feed6ea39ae34f54b3ed5ed5e1 /mesonbuild/dependencies/base.py | |
parent | f5bd3254e926087091ed4c0e5e561d9118aa114b (diff) | |
download | meson-36d4ccaf806660f1a65a959e88e228bd3f5fb746.zip meson-36d4ccaf806660f1a65a959e88e228bd3f5fb746.tar.gz meson-36d4ccaf806660f1a65a959e88e228bd3f5fb746.tar.bz2 |
dependencies: Add a couple of type annotations
Diffstat (limited to 'mesonbuild/dependencies/base.py')
-rw-r--r-- | mesonbuild/dependencies/base.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py index 828f81e..0f8c8a2 100644 --- a/mesonbuild/dependencies/base.py +++ b/mesonbuild/dependencies/base.py @@ -435,13 +435,14 @@ class ConfigToolDependency(ExternalDependency): return m.group(0).rstrip('.') return version - def find_config(self, versions=None, returncode: int = 0): + def find_config(self, versions: T.Optional[T.List[str]] = None, returncode: int = 0) \ + -> T.Tuple[T.Optional[str], T.Optional[str]]: """Helper method that searches for config tool binaries in PATH and returns the one that best matches the given version requirements. """ if not isinstance(versions, list) and versions is not None: versions = listify(versions) - best_match = (None, None) + best_match = (None, None) # type: T.Tuple[T.Optional[str], T.Optional[str]] for potential_bin in find_external_program( self.env, self.for_machine, self.tool_name, self.tool_name, self.tools, allow_default_for_cross=False): |