From f4d9c44e3104184a389178b1f80be5bbddad2aac Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Wed, 20 Sep 2023 19:24:43 +1000 Subject: [PATCH] Restrict "params" to list or None --- winbuild/build_prepare.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/winbuild/build_prepare.py b/winbuild/build_prepare.py index 34bfaa964..a56353e46 100644 --- a/winbuild/build_prepare.py +++ b/winbuild/build_prepare.py @@ -41,14 +41,9 @@ def cmd_rmdir(path: str) -> str: def cmd_nmake( makefile: str | None = None, target: str = "", - params: str | list[str] | tuple[str, ...] = None, + params: list[str] | None = None, ) -> str: - if params is None: - params = "" - elif isinstance(params, (list, tuple)): - params = " ".join(params) - else: - params = str(params) + params = "" if params is None else " ".join(params) return " ".join( [