mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-10 07:09:02 +08:00
Fix code style and typing
This commit is contained in:
parent
07269e4988
commit
f2e518da6b
@ -7,10 +7,12 @@ import cura.CuraApplication # Imported this way to prevent circular references.
|
||||
from cura.Machines.ContainerTree import ContainerTree
|
||||
from cura.Machines.Models.QualityProfilesDropDownMenuModel import QualityProfilesDropDownMenuModel
|
||||
|
||||
|
||||
## This model is used for the custom profile items in the profile drop down
|
||||
# menu.
|
||||
class CustomQualityProfilesDropDownMenuModel(QualityProfilesDropDownMenuModel):
|
||||
def _update(self):
|
||||
|
||||
def _update(self) -> None:
|
||||
Logger.log("d", "Updating {model_class_name}.".format(model_class_name = self.__class__.__name__))
|
||||
|
||||
active_global_stack = cura.CuraApplication.CuraApplication.getInstance().getMachineManager().activeMachine
|
||||
@ -31,4 +33,4 @@ class CustomQualityProfilesDropDownMenuModel(QualityProfilesDropDownMenuModel):
|
||||
|
||||
item_list.append(item)
|
||||
|
||||
self.setItems(item_list)
|
||||
self.setItems(item_list)
|
||||
|
@ -10,7 +10,8 @@ from typing import Any, Dict, Optional
|
||||
# contains an instance container for the global stack and one instance
|
||||
# container per extruder.
|
||||
class QualityChangesGroup(QObject):
|
||||
def __init__(self, name: str, quality_type: str, intent_category: str, parent = None) -> None:
|
||||
|
||||
def __init__(self, name: str, quality_type: str, intent_category: str, parent: Optional["QObject"] = None) -> None:
|
||||
super().__init__(parent)
|
||||
self.name = name
|
||||
self.quality_type = quality_type
|
||||
|
@ -103,7 +103,7 @@ Popup
|
||||
text: model.name + " - " + model.layer_height + " mm"
|
||||
checked:
|
||||
{
|
||||
if(Cura.MachineManager.hasCustomQuality)
|
||||
if (Cura.MachineManager.hasCustomQuality)
|
||||
{
|
||||
// When user created profile is active, no quality tickbox should be active.
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user