mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Add missing return types on init
CURA-8556
This commit is contained in:
parent
daf450142b
commit
37ccf5b823
3 changed files with 5 additions and 3 deletions
|
@ -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.
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue