Fix typing for ubuntu advantage services
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
This commit is contained in:
parent
f294a49f0b
commit
2708ed21e5
|
@ -147,7 +147,7 @@ class UAInterface:
|
|||
""" Return a dictionary containing the subscription information. """
|
||||
return await self.strategy.query_info(token)
|
||||
|
||||
async def get_avail_services(self, token: str) -> list:
|
||||
async def get_avail_services(self, token: str) -> List[dict]:
|
||||
""" Return a list of available services for the subscription
|
||||
associated with the token provided.
|
||||
"""
|
||||
|
|
|
@ -189,7 +189,7 @@ class UbuntuAdvantageView(BaseView):
|
|||
self.remove_overlay()
|
||||
self.show_stretchy_overlay(ContinueAnywayWidget(self))
|
||||
|
||||
def show_available_services(self, services: dict) -> None:
|
||||
def show_available_services(self, services: List[dict]) -> None:
|
||||
""" Display an overlay with the list of services that will be enabled
|
||||
via Ubuntu Advantage subscription. After the user confirms, the next we
|
||||
will quit the current view and move on. """
|
||||
|
@ -199,7 +199,8 @@ class UbuntuAdvantageView(BaseView):
|
|||
|
||||
class ShowServicesWidget(Stretchy):
|
||||
""" Widget to show the available services for UA subscription. """
|
||||
def __init__(self, parent: UbuntuAdvantageView, services: list):
|
||||
def __init__(self, parent: UbuntuAdvantageView,
|
||||
services: List[dict]) -> None:
|
||||
""" Initializes the widget by including the list of services as a
|
||||
bullet-point list. """
|
||||
self.parent = parent
|
||||
|
|
Loading…
Reference in New Issue