aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/dependencies/base.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2019-05-16 00:31:01 +0300
committerGitHub <noreply@github.com>2019-05-16 00:31:01 +0300
commit67a5af99aa9060c9f4b2350a230343b11282cb8f (patch)
tree992a7f255a89a02db5386e02ff83c76c08a640a1 /mesonbuild/dependencies/base.py
parent957d8e051c0c29beb0106e75ae7a71acc5c62cf5 (diff)
parentc571b0b18507a13b6aac749a45ea85cb93ffede3 (diff)
downloadmeson-67a5af99aa9060c9f4b2350a230343b11282cb8f.zip
meson-67a5af99aa9060c9f4b2350a230343b11282cb8f.tar.gz
meson-67a5af99aa9060c9f4b2350a230343b11282cb8f.tar.bz2
Merge pull request #5395 from dcbaker/mtest-annotations
Mtest annotations and bug fixes
Diffstat (limited to 'mesonbuild/dependencies/base.py')
-rw-r--r--mesonbuild/dependencies/base.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py
index 034f6df..f2397e2 100644
--- a/mesonbuild/dependencies/base.py
+++ b/mesonbuild/dependencies/base.py
@@ -1982,7 +1982,8 @@ class DubDependency(ExternalDependency):
class ExternalProgram:
windows_exts = ('exe', 'msc', 'com', 'bat', 'cmd')
- def __init__(self, name, command=None, silent=False, search_dir=None):
+ def __init__(self, name: str, command: typing.Optional[typing.List[str]] = None,
+ silent: bool = False, search_dir: typing.Optional[str] = None):
self.name = name
if command is not None:
self.command = listify(command)
@@ -2006,11 +2007,11 @@ class ExternalProgram:
else:
mlog.log('Program', mlog.bold(name), 'found:', mlog.red('NO'))
- def __repr__(self):
+ def __repr__(self) -> str:
r = '<{} {!r} -> {!r}>'
return r.format(self.__class__.__name__, self.name, self.command)
- def description(self):
+ def description(self) -> str:
'''Human friendly description of the command'''
return ' '.join(self.command)
@@ -2169,7 +2170,7 @@ class ExternalProgram:
# all executables whether in PATH or with an absolute path
return [command]
- def found(self):
+ def found(self) -> bool:
return self.command[0] is not None
def get_command(self):