@@ -96,15 +96,15 @@ class IdQueue:
9696 def __init__ (self , maxsize = 0 ):
9797 self ._queues = defaultdict (partial (jasyncio .Queue , maxsize ))
9898
99- async def get (self , id ):
100- value = await self ._queues [id ].get ()
101- del self ._queues [id ]
99+ async def get (self , id_ ):
100+ value = await self ._queues [id_ ].get ()
101+ del self ._queues [id_ ]
102102 if isinstance (value , Exception ):
103103 raise value
104104 return value
105105
106- async def put (self , id , value ):
107- await self ._queues [id ].put (value )
106+ async def put (self , id_ , value ):
107+ await self ._queues [id_ ].put (value )
108108
109109 async def put_all (self , value ):
110110 for queue in self ._queues .values ():
@@ -176,7 +176,7 @@ async def run_with_interrupt(task, *events, log=None):
176176 task = jasyncio .create_task_with_handler (task , "tmp" , log )
177177 event_tasks = [jasyncio .ensure_future (event .wait ()) for event in events ]
178178 done , pending = await jasyncio .wait (
179- [task ] + event_tasks , return_when = jasyncio .FIRST_COMPLETED
179+ [task , * event_tasks ] , return_when = jasyncio .FIRST_COMPLETED
180180 )
181181 for f in pending :
182182 f .cancel () # cancel unfinished tasks
@@ -194,6 +194,8 @@ async def run_with_interrupt(task, *events, log=None):
194194
195195
196196class Addrs (univ .SequenceOf ):
197+ """Internal."""
198+
197199 componentType = char .PrintableString ()
198200
199201
@@ -215,7 +217,8 @@ class RegistrationInfo(univ.Sequence):
215217def generate_user_controller_access_token (
216218 username , controller_endpoints , secret_key , controller_name
217219):
218- """ " Implement in python what is currently done in GO
220+ """Implement in python what is currently done in GO.
221+
219222 https://github.com/juju/juju/blob/a5ab92e/cmd/juju/user/utils.go#L16
220223
221224 :param username: name of the user to register
@@ -502,7 +505,9 @@ def user_requested(series_arg, supported_series, force):
502505def series_selector (
503506 series_arg = "" , charm_url = None , model_config = None , supported_series = [], force = False
504507):
505- """series_selector corresponds to the CharmSeries() in
508+ """Select series to deploy on.
509+
510+ series_selector corresponds to the CharmSeries() in
506511 https://github.com/juju/juju/blob/develop/core/charm/series_selector.go
507512
508513 determines what series to use with a charm.
0 commit comments