Restrict "params" to list or None

This commit is contained in:
Andrew Murray 2023-09-20 19:24:43 +10:00
parent 82c3999bc9
commit f4d9c44e31

View File

@ -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(
[