Skip to content

Commit

Permalink
Fix Accelerate string arguments passing (#2845)
Browse files Browse the repository at this point in the history
* fix str arguments pass

* simplify args passing

* lint
  • Loading branch information
avishniakov authored Jul 15, 2024
1 parent f454d7d commit f0f9d03
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,9 @@ def inner(*args: Any, **kwargs: Any) -> Any:
if isinstance(v, bool):
if v:
commands.append(f"--{k}")
elif isinstance(v, str):
commands += [f"--{k}", '"{v}"']
elif type(v) in (list, tuple, set):
for each in v:
commands.append(f"--{k}")
if isinstance(each, str):
commands.append(f'"{each}"')
else:
commands.append(f"{each}")
commands += [f"--{k}", f"{each}"]
else:
commands += [f"--{k}", f"{v}"]

Expand Down

0 comments on commit f0f9d03

Please sign in to comment.