@@ -397,7 +397,7 @@ async def destroy_models(
397397
398398 """
399399 uuids = await self .model_uuids ()
400- models = [uuids [ model ] if model in uuids else model for model in models ]
400+ models = [uuids . get ( model ) or model for model in models ]
401401
402402 model_facade = client .ModelManagerFacade .from_connection (self .connection ())
403403
@@ -574,7 +574,7 @@ async def get_models(self, all=False, username=None): # noqa: A002
574574 """
575575 return await self .list_models (username , all )
576576
577- async def model_uuids (self , username = None , all = False ):
577+ async def model_uuids (self , username = None , all = False ): # noqa: A002
578578 """Return a mapping of model names to UUIDs the given user can access.
579579
580580 :param str username: Optional username argument, defaults to
@@ -599,7 +599,7 @@ async def model_uuids(self, username=None, all=False):
599599 model_summary .name : model_summary .uuid for model_summary in model_summaries
600600 }
601601
602- async def list_models (self , username = None , all = False ):
602+ async def list_models (self , username = None , all = False ): # noqa: A002
603603 """Return list of names of the available models on this controller.
604604
605605 Equivalent to ``sorted((await self.model_uuids()).keys())``
@@ -885,7 +885,7 @@ async def _watcher(stop_event):
885885 jasyncio .ensure_future (_watcher (stop_event ))
886886 return stop_event
887887
888- async def add_secret_backends (self , id , name , backend_type , config ):
888+ async def add_secret_backends (self , id_ , name , backend_type , config ):
889889 """Add a new secret backend.
890890
891891 Parameters
@@ -907,7 +907,7 @@ async def add_secret_backends(self, id, name, backend_type, config):
907907 facade = client .SecretBackendsFacade .from_connection (self .connection ())
908908 return await facade .AddSecretBackends ([
909909 {
910- "id" : id ,
910+ "id" : id_ ,
911911 "backend-type" : backend_type ,
912912 "config" : config ,
913913 "name" : name ,
0 commit comments