mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 15:07:28 -06:00
Small code improvements
This commit is contained in:
parent
f34fc7e6f9
commit
fa5b083b74
9 changed files with 15 additions and 8 deletions
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) 2018 Ultimaker B.V.
|
||||
# Cura is released under the terms of the LGPLv3 or higher.
|
||||
from time import time
|
||||
from typing import List, Optional, Set, cast
|
||||
from typing import List, Optional, cast
|
||||
|
||||
from PyQt5.QtCore import QObject, QUrl, pyqtProperty, pyqtSignal, pyqtSlot
|
||||
from PyQt5.QtGui import QDesktopServices
|
||||
|
@ -13,7 +13,6 @@ from UM.Logger import Logger
|
|||
from UM.Message import Message
|
||||
from UM.Scene.SceneNode import SceneNode
|
||||
from UM.Version import Version
|
||||
|
||||
from cura.CuraApplication import CuraApplication
|
||||
from cura.PrinterOutput.NetworkedPrinterOutputDevice import AuthState
|
||||
from cura.PrinterOutput.PrinterOutputDevice import ConnectionType
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
## Base model that maps kwargs to instance attributes.
|
||||
# Copyright (c) 2018 Ultimaker B.V.
|
||||
# Cura is released under the terms of the LGPLv3 or higher.
|
||||
from datetime import datetime, timezone
|
||||
from typing import TypeVar, Dict, List, Any, Type, Union
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
## Class representing a material that was fetched from the cluster API.
|
||||
# Copyright (c) 2018 Ultimaker B.V.
|
||||
# Cura is released under the terms of the LGPLv3 or higher.
|
||||
from .BaseModel import BaseModel
|
||||
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# Copyright (c) 2018 Ultimaker B.V.
|
||||
# Cura is released under the terms of the LGPLv3 or higher.
|
||||
from typing import Optional
|
||||
|
||||
from UM.Logger import Logger
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
## Class representing a local material that was fetched from the container registry.
|
||||
# Copyright (c) 2018 Ultimaker B.V.
|
||||
# Cura is released under the terms of the LGPLv3 or higher.
|
||||
from .BaseModel import BaseModel
|
||||
|
||||
|
||||
|
|
|
@ -10,8 +10,8 @@ from UM.Version import Version
|
|||
from cura.CuraApplication import CuraApplication
|
||||
from cura.PrinterOutput.PrinterOutputDevice import PrinterOutputDevice
|
||||
from cura.Settings.GlobalStack import GlobalStack
|
||||
from plugins.UM3NetworkPrinting.src.Network.ZeroConfClient import ZeroConfClient
|
||||
|
||||
from .ZeroConfClient import ZeroConfClient
|
||||
from .ClusterApiClient import ClusterApiClient
|
||||
from .NetworkOutputDevice import NetworkOutputDevice
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# Copyright (c) 2019 Ultimaker B.V.
|
||||
# Cura is released under the terms of the LGPLv3 or higher.
|
||||
import os
|
||||
from abc import ABC
|
||||
from typing import List, Optional, Dict
|
||||
|
||||
from PyQt5.QtCore import pyqtProperty, pyqtSignal, QObject, pyqtSlot, QUrl
|
||||
|
@ -22,7 +23,7 @@ from .Models.Http.ClusterPrintJobStatus import ClusterPrintJobStatus
|
|||
## Output device class that forms the basis of Ultimaker networked printer output devices.
|
||||
# Currently used for local networking and cloud printing using Ultimaker Connect.
|
||||
# This base class primarily contains all the Qt properties and slots needed for the monitor page to work.
|
||||
class UltimakerNetworkedPrinterOutputDevice(NetworkedPrinterOutputDevice):
|
||||
class UltimakerNetworkedPrinterOutputDevice(NetworkedPrinterOutputDevice, ABC):
|
||||
|
||||
# Signal emitted when the status of the print jobs for this cluster were changed over the network.
|
||||
printJobsChanged = pyqtSignal()
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# Copyright (c) 2018 Ultimaker B.V.
|
||||
# Cura is released under the terms of the LGPLv3 or higher.
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
from UM import i18nCatalog
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue