aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2023-10-16 16:01:37 -0700
committerDylan Baker <dylan@pnwbakers.com>2024-02-23 09:48:32 -0800
commit9752b89100a9ffc42a6eb4a788f806958bda1107 (patch)
treefc4734b8c94f1c74d14cbd70748d99ac86d11507
parenta75ced6d50a3d479eda6dcdc9c3482493f2161f0 (diff)
downloadmeson-9752b89100a9ffc42a6eb4a788f806958bda1107.zip
meson-9752b89100a9ffc42a6eb4a788f806958bda1107.tar.gz
meson-9752b89100a9ffc42a6eb4a788f806958bda1107.tar.bz2
modules: fix find_program.wanted
Which should be `str | list[str]`, not `str | None`.
-rw-r--r--mesonbuild/modules/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/modules/__init__.py b/mesonbuild/modules/__init__.py
index e7aeb8a..8d6b20f 100644
--- a/mesonbuild/modules/__init__.py
+++ b/mesonbuild/modules/__init__.py
@@ -73,7 +73,7 @@ class ModuleState:
def find_program(self, prog: T.Union[mesonlib.FileOrString, T.List[mesonlib.FileOrString]],
required: bool = True,
version_func: T.Optional[ProgramVersionFunc] = None,
- wanted: T.Optional[str] = None, silent: bool = False,
+ wanted: T.Union[str, T.List[str]] = '', silent: bool = False,
for_machine: MachineChoice = MachineChoice.HOST) -> T.Union[ExternalProgram, build.Executable, OverrideProgram]:
if not isinstance(prog, list):
prog = [prog]