aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/build.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/build.py')
-rw-r--r--mesonbuild/build.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py
index 8968b18..e9d6dae 100644
--- a/mesonbuild/build.py
+++ b/mesonbuild/build.py
@@ -2170,7 +2170,8 @@ class CustomTarget(Target):
'env',
])
- def __init__(self, name, subdir, subproject, kwargs, absolute_paths=False, backend=None):
+ def __init__(self, name: str, subdir: str, subproject: str, kwargs: T.Dict[str, T.Any],
+ absolute_paths: bool = False, backend: T.Optional[str] = None):
self.typename = 'custom'
# TODO expose keyword arg to make MachineChoice.HOST configurable
super().__init__(name, subdir, subproject, False, MachineChoice.HOST)
@@ -2185,7 +2186,7 @@ class CustomTarget(Target):
for k in kwargs:
if k not in CustomTarget.known_kwargs:
unknowns.append(k)
- if len(unknowns) > 0:
+ if unknowns:
mlog.warning('Unknown keyword arguments in target {}: {}'.format(self.name, ', '.join(unknowns)))
def get_default_install_dir(self, environment):