mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 13:55:56 +08:00
Better typing
CURA-8849
This commit is contained in:
parent
6f8470167f
commit
f9dda40409
@ -2,9 +2,9 @@
|
|||||||
# Cura is released under the terms of the LGPLv3 or higher.
|
# Cura is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
import collections
|
import collections
|
||||||
from typing import OrderedDict
|
from typing import OrderedDict, Optional
|
||||||
|
|
||||||
from PyQt6.QtCore import Qt, QTimer
|
from PyQt6.QtCore import Qt, QTimer, QObject
|
||||||
|
|
||||||
import cura
|
import cura
|
||||||
from UM import i18nCatalog
|
from UM import i18nCatalog
|
||||||
@ -25,7 +25,7 @@ class IntentSelectionModel(ListModel):
|
|||||||
DescriptionRole = Qt.ItemDataRole.UserRole + 4
|
DescriptionRole = Qt.ItemDataRole.UserRole + 4
|
||||||
IconRole = Qt.ItemDataRole.UserRole + 5
|
IconRole = Qt.ItemDataRole.UserRole + 5
|
||||||
|
|
||||||
def __init__(self, parent = None) -> None:
|
def __init__(self, parent: Optional[QObject] = None) -> None:
|
||||||
super().__init__(parent)
|
super().__init__(parent)
|
||||||
|
|
||||||
self.addRoleName(self.NameRole, "name")
|
self.addRoleName(self.NameRole, "name")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user