mirror of
https://github.com/sotam0316/docker-py-revanced.git
synced 2026-04-25 03:48:37 +09:00
♻️ Better options
This commit is contained in:
@@ -45,6 +45,11 @@ class Parser(object):
|
||||
if value := opt.get("value"):
|
||||
if isinstance(value, bool):
|
||||
pair += f'="{str(value).lower()}"'
|
||||
elif isinstance(value, (int, float)):
|
||||
pair += f"={value}" # Numbers should not be quoted
|
||||
elif isinstance(value, list):
|
||||
formatted_list = ",".join(map(str, value))
|
||||
pair += f'="[ {formatted_list} ]"' # Preserve list format
|
||||
else:
|
||||
pair += f'="{value}"'
|
||||
return pair
|
||||
|
||||
Reference in New Issue
Block a user