You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@propertydefmodel(self) ->Optional[Model]:
"""Represents the current model."""current_state=self.current_aliasandself._models.get(self.current_alias)
returncurrent_state.modelifcurrent_stateelseNone
I'm proposing to type it as Model and raise if the model is not available.
The text was updated successfully, but these errors were encountered:
@dimaqq Do you think it constitutes a major rev on this package? It feels kinda sneaky to keep subtly changing the API. I get the reasoning to begin to add a ModelMissing error -- but it feels a bit icky to change the API.
It seems that most charms' integration tests assume that
ops_test.model
is truthy (6592 call sites):And a few ensure that it's truthy (46 call sites):
I didn't find a single test that's conditional on the model being or not being there. We're tracking ~160 charming repos in https://github.com/tonyandrewmeyer/charm-analysis
Currently, it's typed so:
I'm proposing to type it as
Model
and raise if the model is not available.The text was updated successfully, but these errors were encountered: