Skip to content

Commit

Permalink
convenience: split retval of GTFILIST into actual list
Browse files Browse the repository at this point in the history
So caller doesn't have to.
  • Loading branch information
gavanderhoorn committed Jan 29, 2023
1 parent bda655a commit 892dfa3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/comet_rpc/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,11 @@ class GetRawFileResponse(BaseRpcResponse):

class GetFileListResponse(BaseRpcResponse):
rpc: t.Literal[RpcId.GTFILIST]
value: str
value: t.List[str]

@validator("value", pre=True)
def decode_value(cls, v):
return v.split(",") if isinstance(v, str) else v


class TxMlCurPosResponse(BaseRpcResponse):
Expand Down

0 comments on commit 892dfa3

Please sign in to comment.