Skip to content

Commit 862d336

Browse files
committed
Fixes multiple issues
- Fix tox.ini to use supported python versions. - Fix contraints regex using subscript on matches (py36). - Fix facade return type documentation. - Fix schema objects with array values. - Add definition test.
1 parent fe1e4cc commit 862d336

19 files changed

Lines changed: 1806 additions & 1730 deletions

juju/client/_client1.py

Lines changed: 257 additions & 257 deletions
Large diffs are not rendered by default.

juju/client/_client10.py

Lines changed: 70 additions & 70 deletions
Large diffs are not rendered by default.

juju/client/_client11.py

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ async def AddRelation(self, endpoints=None, via_cidrs=None):
701701
'''
702702
endpoints : typing.Sequence[str]
703703
via_cidrs : typing.Sequence[str]
704-
Returns -> typing.Mapping[str, ~CharmRelation]
704+
Returns -> AddRelationResults
705705
'''
706706
if endpoints is not None and not isinstance(endpoints, (bytes, str, list)):
707707
raise Exception("Expected endpoints to be a Sequence, received: {}".format(type(endpoints)))
@@ -730,7 +730,7 @@ async def AddUnits(self, application=None, attach_storage=None, num_units=None,
730730
num_units : int
731731
placement : typing.Sequence[~Placement]
732732
policy : str
733-
Returns -> typing.Sequence[str]
733+
Returns -> AddApplicationUnitsResults
734734
'''
735735
if application is not None and not isinstance(application, (bytes, str)):
736736
raise Exception("Expected application to be a str, received: {}".format(type(application)))
@@ -767,7 +767,7 @@ async def AddUnits(self, application=None, attach_storage=None, num_units=None,
767767
async def ApplicationsInfo(self, entities=None):
768768
'''
769769
entities : typing.Sequence[~Entity]
770-
Returns -> typing.Sequence[~ApplicationInfoResult]
770+
Returns -> ApplicationInfoResults
771771
'''
772772
if entities is not None and not isinstance(entities, (bytes, str, list)):
773773
raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))
@@ -788,7 +788,7 @@ async def ApplicationsInfo(self, entities=None):
788788
async def CharmConfig(self, args=None):
789789
'''
790790
args : typing.Sequence[~ApplicationGet]
791-
Returns -> typing.Sequence[~ConfigResult]
791+
Returns -> ApplicationGetConfigResults
792792
'''
793793
if args is not None and not isinstance(args, (bytes, str, list)):
794794
raise Exception("Expected args to be a Sequence, received: {}".format(type(args)))
@@ -809,7 +809,7 @@ async def CharmConfig(self, args=None):
809809
async def CharmRelations(self, application=None):
810810
'''
811811
application : str
812-
Returns -> typing.Sequence[str]
812+
Returns -> ApplicationCharmRelationsResults
813813
'''
814814
if application is not None and not isinstance(application, (bytes, str)):
815815
raise Exception("Expected application to be a str, received: {}".format(type(application)))
@@ -830,7 +830,7 @@ async def CharmRelations(self, application=None):
830830
async def Consume(self, args=None):
831831
'''
832832
args : typing.Sequence[~ConsumeApplicationArg]
833-
Returns -> typing.Sequence[~ErrorResult]
833+
Returns -> ErrorResults
834834
'''
835835
if args is not None and not isinstance(args, (bytes, str, list)):
836836
raise Exception("Expected args to be a Sequence, received: {}".format(type(args)))
@@ -851,7 +851,7 @@ async def Consume(self, args=None):
851851
async def Deploy(self, applications=None):
852852
'''
853853
applications : typing.Sequence[~ApplicationDeploy]
854-
Returns -> typing.Sequence[~ErrorResult]
854+
Returns -> ErrorResults
855855
'''
856856
if applications is not None and not isinstance(applications, (bytes, str, list)):
857857
raise Exception("Expected applications to be a Sequence, received: {}".format(type(applications)))
@@ -893,7 +893,7 @@ async def Destroy(self, application=None):
893893
async def DestroyApplication(self, applications=None):
894894
'''
895895
applications : typing.Sequence[~DestroyApplicationParams]
896-
Returns -> typing.Sequence[~DestroyApplicationResult]
896+
Returns -> DestroyApplicationResults
897897
'''
898898
if applications is not None and not isinstance(applications, (bytes, str, list)):
899899
raise Exception("Expected applications to be a Sequence, received: {}".format(type(applications)))
@@ -914,7 +914,7 @@ async def DestroyApplication(self, applications=None):
914914
async def DestroyConsumedApplications(self, applications=None):
915915
'''
916916
applications : typing.Sequence[~DestroyConsumedApplicationParams]
917-
Returns -> typing.Sequence[~ErrorResult]
917+
Returns -> ErrorResults
918918
'''
919919
if applications is not None and not isinstance(applications, (bytes, str, list)):
920920
raise Exception("Expected applications to be a Sequence, received: {}".format(type(applications)))
@@ -971,7 +971,7 @@ async def DestroyRelation(self, endpoints=None, force=None, max_wait=None, relat
971971
async def DestroyUnit(self, units=None):
972972
'''
973973
units : typing.Sequence[~DestroyUnitParams]
974-
Returns -> typing.Sequence[~DestroyUnitResult]
974+
Returns -> DestroyUnitResults
975975
'''
976976
if units is not None and not isinstance(units, (bytes, str, list)):
977977
raise Exception("Expected units to be a Sequence, received: {}".format(type(units)))
@@ -1035,7 +1035,7 @@ async def Get(self, application=None, branch=None):
10351035
'''
10361036
application : str
10371037
branch : str
1038-
Returns -> typing.Union[str, typing.Mapping[str, typing.Any], ForwardRef('Value'), typing.Mapping[str, str]]
1038+
Returns -> ApplicationGetResults
10391039
'''
10401040
if application is not None and not isinstance(application, (bytes, str)):
10411041
raise Exception("Expected application to be a str, received: {}".format(type(application)))
@@ -1061,7 +1061,7 @@ async def GetCharmURL(self, application=None, branch=None):
10611061
'''
10621062
application : str
10631063
branch : str
1064-
Returns -> typing.Union[ForwardRef('Error'), str]
1064+
Returns -> StringResult
10651065
'''
10661066
if application is not None and not isinstance(application, (bytes, str)):
10671067
raise Exception("Expected application to be a str, received: {}".format(type(application)))
@@ -1086,7 +1086,7 @@ async def GetCharmURL(self, application=None, branch=None):
10861086
async def GetConfig(self, entities=None):
10871087
'''
10881088
entities : typing.Sequence[~Entity]
1089-
Returns -> typing.Sequence[~ConfigResult]
1089+
Returns -> ApplicationGetConfigResults
10901090
'''
10911091
if entities is not None and not isinstance(entities, (bytes, str, list)):
10921092
raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))
@@ -1107,7 +1107,7 @@ async def GetConfig(self, entities=None):
11071107
async def GetConstraints(self, entities=None):
11081108
'''
11091109
entities : typing.Sequence[~Entity]
1110-
Returns -> typing.Sequence[~ApplicationConstraint]
1110+
Returns -> ApplicationGetConstraintsResults
11111111
'''
11121112
if entities is not None and not isinstance(entities, (bytes, str, list)):
11131113
raise Exception("Expected entities to be a Sequence, received: {}".format(type(entities)))
@@ -1128,7 +1128,7 @@ async def GetConstraints(self, entities=None):
11281128
async def MergeBindings(self, args=None):
11291129
'''
11301130
args : typing.Sequence[~ApplicationMergeBindings]
1131-
Returns -> typing.Sequence[~ErrorResult]
1131+
Returns -> ErrorResults
11321132
'''
11331133
if args is not None and not isinstance(args, (bytes, str, list)):
11341134
raise Exception("Expected args to be a Sequence, received: {}".format(type(args)))
@@ -1151,7 +1151,7 @@ async def ResolveUnitErrors(self, all_=None, retry=None, tags=None):
11511151
all_ : bool
11521152
retry : bool
11531153
tags : Entities
1154-
Returns -> typing.Sequence[~ErrorResult]
1154+
Returns -> ErrorResults
11551155
'''
11561156
if all_ is not None and not isinstance(all_, bool):
11571157
raise Exception("Expected all_ to be a bool, received: {}".format(type(all_)))
@@ -1180,7 +1180,7 @@ async def ResolveUnitErrors(self, all_=None, retry=None, tags=None):
11801180
async def ScaleApplications(self, applications=None):
11811181
'''
11821182
applications : typing.Sequence[~ScaleApplicationParams]
1183-
Returns -> typing.Sequence[~ScaleApplicationResult]
1183+
Returns -> ScaleApplicationResults
11841184
'''
11851185
if applications is not None and not isinstance(applications, (bytes, str, list)):
11861186
raise Exception("Expected applications to be a Sequence, received: {}".format(type(applications)))
@@ -1232,7 +1232,7 @@ async def Set(self, application=None, branch=None, options=None):
12321232
async def SetApplicationsConfig(self, args=None):
12331233
'''
12341234
args : typing.Sequence[~ApplicationConfigSet]
1235-
Returns -> typing.Sequence[~ErrorResult]
1235+
Returns -> ErrorResults
12361236
'''
12371237
if args is not None and not isinstance(args, (bytes, str, list)):
12381238
raise Exception("Expected args to be a Sequence, received: {}".format(type(args)))
@@ -1355,7 +1355,7 @@ async def SetConstraints(self, application=None, constraints=None):
13551355
async def SetMetricCredentials(self, creds=None):
13561356
'''
13571357
creds : typing.Sequence[~ApplicationMetricCredential]
1358-
Returns -> typing.Sequence[~ErrorResult]
1358+
Returns -> ErrorResults
13591359
'''
13601360
if creds is not None and not isinstance(creds, (bytes, str, list)):
13611361
raise Exception("Expected creds to be a Sequence, received: {}".format(type(creds)))
@@ -1376,7 +1376,7 @@ async def SetMetricCredentials(self, creds=None):
13761376
async def SetRelationsSuspended(self, args=None):
13771377
'''
13781378
args : typing.Sequence[~RelationSuspendedArg]
1379-
Returns -> typing.Sequence[~ErrorResult]
1379+
Returns -> ErrorResults
13801380
'''
13811381
if args is not None and not isinstance(args, (bytes, str, list)):
13821382
raise Exception("Expected args to be a Sequence, received: {}".format(type(args)))
@@ -1449,7 +1449,7 @@ async def Unset(self, application=None, branch=None, options=None):
14491449
async def UnsetApplicationsConfig(self, args=None):
14501450
'''
14511451
args : typing.Sequence[~ApplicationUnset]
1452-
Returns -> typing.Sequence[~ErrorResult]
1452+
Returns -> ErrorResults
14531453
'''
14541454
if args is not None and not isinstance(args, (bytes, str, list)):
14551455
raise Exception("Expected args to be a Sequence, received: {}".format(type(args)))
@@ -1536,7 +1536,7 @@ async def Update(self, application=None, charm_url=None, constraints=None, force
15361536
async def UpdateApplicationSeries(self, args=None):
15371537
'''
15381538
args : typing.Sequence[~UpdateSeriesArg]
1539-
Returns -> typing.Sequence[~ErrorResult]
1539+
Returns -> ErrorResults
15401540
'''
15411541
if args is not None and not isinstance(args, (bytes, str, list)):
15421542
raise Exception("Expected args to be a Sequence, received: {}".format(type(args)))

0 commit comments

Comments
 (0)