mirror of
https://gitea.tendokyu.moe/Hay1tsme/artemis.git
synced 2026-02-14 19:57:27 +08:00
diva: add list decoders
This commit is contained in:
@@ -241,3 +241,9 @@ def encode_list(key: str, val: Union[List[Any], None], urlencode_final_val: boo
|
||||
all_vals = quote(all_vals)
|
||||
|
||||
return f"{key}={all_vals}"
|
||||
|
||||
def decode_list_int(val: str) -> List[int]:
|
||||
return [int(x) for x in val.split(",")]
|
||||
|
||||
def decode_list(val: str) -> List[str]:
|
||||
return [x for x in val.split(",")]
|
||||
Reference in New Issue
Block a user