mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-16 11:17:49 -06:00
Fix typing in IntentCategoryModel.
This commit is contained in:
parent
2843fc903b
commit
6b918dbd1d
1 changed files with 3 additions and 3 deletions
|
@ -19,14 +19,14 @@ class IntentCategoryModel(ListModel):
|
|||
|
||||
#Translations to user-visible string. Ordered by weight.
|
||||
#TODO: Create a solution for this name and weight to be used dynamically.
|
||||
name_translation = collections.OrderedDict()
|
||||
name_translation = collections.OrderedDict() #type: "collections.OrderedDict[str,str]"
|
||||
name_translation["default"] = catalog.i18nc("@label", "Default")
|
||||
name_translation["engineering"] = catalog.i18nc("@label", "Engineering")
|
||||
name_translation["smooth"] = catalog.i18nc("@label", "Smooth")
|
||||
|
||||
## Creates a new model for a certain intent category.
|
||||
# \param The category to list the intent profiles for.
|
||||
def __init__(self, intent_category: str):
|
||||
def __init__(self, intent_category: str) -> None:
|
||||
super().__init__()
|
||||
self._intent_category = intent_category
|
||||
|
||||
|
@ -35,7 +35,7 @@ class IntentCategoryModel(ListModel):
|
|||
self.addRoleName(self.WeightRole, "weight")
|
||||
|
||||
## Updates the list of intents.
|
||||
def update(self):
|
||||
def update(self) -> None:
|
||||
available_categories = IntentManager.getInstance().currentAvailableIntentCategories()
|
||||
result = []
|
||||
for category in available_categories:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue