diff --git a/plugins/Marketplace/Marketplace.py b/plugins/Marketplace/Marketplace.py index 506b8347e2..0dd5b29a5a 100644 --- a/plugins/Marketplace/Marketplace.py +++ b/plugins/Marketplace/Marketplace.py @@ -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. PACKAGES_URL = f"{ROOT_URL}/packages" # URL to use for requesting the list of packages. + class Marketplace(Extension): """ The main managing object for the Marketplace plug-in. """ - def __init__(self): + def __init__(self) -> None: super().__init__() self._window: Optional["QObject"] = None # If the window has been loaded yet, it'll be cached in here. diff --git a/plugins/Marketplace/PackageList.py b/plugins/Marketplace/PackageList.py index f4bb0374ba..4980ec4a81 100644 --- a/plugins/Marketplace/PackageList.py +++ b/plugins/Marketplace/PackageList.py @@ -21,6 +21,7 @@ if TYPE_CHECKING: catalog = i18nCatalog("cura") + class PackageList(ListModel): """ 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. - def __init__(self, parent: "QObject" = None): + def __init__(self, parent: "QObject" = None) -> None: super().__init__(parent) self._is_loading = True diff --git a/plugins/Marketplace/PackageModel.py b/plugins/Marketplace/PackageModel.py index eba9d63a6c..5ca25b370b 100644 --- a/plugins/Marketplace/PackageModel.py +++ b/plugins/Marketplace/PackageModel.py @@ -16,7 +16,7 @@ class PackageModel(QObject): 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. :param package_data: The data received from the Marketplace API about the package to create.