We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jRPC responses are pumped through SomeResult.from_json(data) to convert dicts to proper data classes.
SomeResult.from_json(data)
the from_json() classmethod though is capable of doing so many different things...
from_json()
this means that the classmethod has a weird return type, Self|None which has cascading effects on all the users of any facade call.
Self|None
Casually reporting
3.5.2
any
class ApplicationInfoResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None, **unknown_fields): ''' results : typing.Sequence[~ApplicationInfoResult] ''' results_ = [ApplicationInfoResult.from_json(o) for o in results or []] # Validate arguments against known Juju API types. if results_ is not None and not isinstance(results_, (bytes, str, list)): raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) self.results = results_ from typing import reveal_type W reveal_type(self.results) # W: Type of "self.results" is "list[ApplicationInfoResult | None]" self.unknown_fields = unknown_fields
The text was updated successfully, but these errors were encountered:
Original commit 9c204c0
Sorry, something went wrong.
No branches or pull requests
Description
jRPC responses are pumped through
SomeResult.from_json(data)
to convert dicts to proper data classes.the
from_json()
classmethod though is capable of doing so many different things...this means that the classmethod has a weird return type,
Self|None
which has cascading effects on all the users of any facade call.Urgency
Casually reporting
Python-libjuju version
3.5.2
Juju version
any
Reproduce / Test
The text was updated successfully, but these errors were encountered: