Add missing return types on init

CURA-8556
This commit is contained in:
Jaime van Kessel 2021-10-25 10:37:02 +02:00
parent daf450142b
commit 37ccf5b823
3 changed files with 5 additions and 3 deletions

View file

@ -21,12 +21,13 @@ if TYPE_CHECKING:
ROOT_URL = f"{UltimakerCloudConstants.CuraCloudAPIRoot}/cura-packages/v{UltimakerCloudConstants.CuraCloudAPIVersion}/cura/v{CuraSDKVersion}" # Root of all Marketplace API requests. ROOT_URL = f"{UltimakerCloudConstants.CuraCloudAPIRoot}/cura-packages/v{UltimakerCloudConstants.CuraCloudAPIVersion}/cura/v{CuraSDKVersion}" # Root of all Marketplace API requests.
PACKAGES_URL = f"{ROOT_URL}/packages" # URL to use for requesting the list of packages. PACKAGES_URL = f"{ROOT_URL}/packages" # URL to use for requesting the list of packages.
class Marketplace(Extension): class Marketplace(Extension):
""" """
The main managing object for the Marketplace plug-in. The main managing object for the Marketplace plug-in.
""" """
def __init__(self): def __init__(self) -> None:
super().__init__() super().__init__()
self._window: Optional["QObject"] = None # If the window has been loaded yet, it'll be cached in here. self._window: Optional["QObject"] = None # If the window has been loaded yet, it'll be cached in here.

View file

@ -21,6 +21,7 @@ if TYPE_CHECKING:
catalog = i18nCatalog("cura") catalog = i18nCatalog("cura")
class PackageList(ListModel): class PackageList(ListModel):
""" """
Represents a list of packages to be displayed in the interface. Represents a list of packages to be displayed in the interface.
@ -33,7 +34,7 @@ class PackageList(ListModel):
ITEMS_PER_PAGE = 20 # Pagination of number of elements to download at once. ITEMS_PER_PAGE = 20 # Pagination of number of elements to download at once.
def __init__(self, parent: "QObject" = None): def __init__(self, parent: "QObject" = None) -> None:
super().__init__(parent) super().__init__(parent)
self._is_loading = True self._is_loading = True

View file

@ -16,7 +16,7 @@ class PackageModel(QObject):
QML. The model can also be constructed directly from a response received by the API. QML. The model can also be constructed directly from a response received by the API.
""" """
def __init__(self, package_data: Dict[str, Any], parent: QObject = None): def __init__(self, package_data: Dict[str, Any], parent: QObject = None) -> None:
""" """
Constructs a new model for a single package. Constructs a new model for a single package.
:param package_data: The data received from the Marketplace API about the package to create. :param package_data: The data received from the Marketplace API about the package to create.