Skip to content

Commit d7abe10

Browse files
committed
chore: note on converted responses
1 parent 4276d99 commit d7abe10

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

juju/client/facade.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -499,10 +499,14 @@ def _convert_response(response: dict[str, Any], *, cls: type[Type] | None) -> An
499499
if cls is None:
500500
return response
501501
if "error" in response:
502+
# TODO: I don't think this ever happens,
503+
# errors are handled by Connection.rpc(),
504+
# though, admittedly the shape is different.
502505
cls = CLASSES["Error"]
503506
if typing_inspect.is_generic_type(cls) and issubclass(
504507
typing_inspect.get_origin(cls), Sequence
505508
):
509+
# TODO: I'm not sure this ever happens either.
506510
parameters = typing_inspect.get_parameters(cls)
507511
result = []
508512
item_cls = parameters[0]

0 commit comments

Comments
 (0)