Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNino van Hooff <ninovanhooff@gmail.com>2020-05-29 15:30:33 +0300
committerNino van Hooff <ninovanhooff@gmail.com>2020-05-29 15:30:33 +0300
commit89f0970a887612a6819263633180d027d06224af (patch)
tree0b900495a95a234c15f893563975eb346aee6e20 /plugins
parent1e33360c359373f7acbf95ca9706514d12c0dd7f (diff)
Remove trailing whitespace from Python files
Diffstat (limited to 'plugins')
-rwxr-xr-xplugins/3MFReader/ThreeMFReader.py10
-rwxr-xr-xplugins/3MFReader/ThreeMFWorkspaceReader.py12
-rw-r--r--plugins/3MFReader/__init__.py2
-rw-r--r--plugins/3MFWriter/ThreeMFWorkspaceWriter.py2
-rw-r--r--plugins/3MFWriter/ThreeMFWriter.py4
-rw-r--r--plugins/AMFReader/AMFReader.py2
-rwxr-xr-xplugins/CuraEngineBackend/CuraEngineBackend.py2
-rw-r--r--plugins/CuraEngineBackend/ProcessSlicedLayersJob.py4
-rw-r--r--plugins/CuraProfileReader/CuraProfileReader.py12
-rw-r--r--plugins/CuraProfileWriter/CuraProfileWriter.py2
-rw-r--r--plugins/FirmwareUpdateChecker/FirmwareUpdateChecker.py6
-rw-r--r--plugins/GCodeGzReader/GCodeGzReader.py2
-rw-r--r--plugins/GCodeGzWriter/GCodeGzWriter.py6
-rw-r--r--plugins/GCodeProfileReader/GCodeProfileReader.py10
-rw-r--r--plugins/GCodeReader/FlavorParser.py2
-rw-r--r--plugins/GCodeReader/RepRapFlavorParser.py4
-rw-r--r--plugins/GCodeWriter/GCodeWriter.py18
-rw-r--r--plugins/LegacyProfileReader/LegacyProfileReader.py16
-rwxr-xr-xplugins/MachineSettingsAction/MachineSettingsAction.py4
-rw-r--r--plugins/ModelChecker/ModelChecker.py2
-rw-r--r--plugins/PerObjectSettingsTool/PerObjectSettingVisibilityHandler.py2
-rw-r--r--plugins/PerObjectSettingsTool/PerObjectSettingsTool.py6
-rw-r--r--plugins/PostProcessingPlugin/PostProcessingPlugin.py6
-rw-r--r--plugins/PostProcessingPlugin/Script.py8
-rw-r--r--plugins/PostProcessingPlugin/scripts/ColorMix.py8
-rw-r--r--plugins/PostProcessingPlugin/scripts/DisplayFilenameAndLayerOnLCD.py4
-rw-r--r--plugins/PostProcessingPlugin/scripts/FilamentChange.py2
-rw-r--r--plugins/PostProcessingPlugin/scripts/SearchAndReplace.py2
-rw-r--r--plugins/PostProcessingPlugin/scripts/UsePreviousProbeMeasurements.py2
-rw-r--r--plugins/PreviewStage/PreviewStage.py8
-rw-r--r--plugins/RemovableDriveOutputDevice/LinuxRemovableDrivePlugin.py2
-rw-r--r--plugins/RemovableDriveOutputDevice/RemovableDriveOutputDevice.py8
-rw-r--r--plugins/SentryLogger/SentryLogger.py6
-rwxr-xr-xplugins/SliceInfoPlugin/SliceInfo.py4
-rw-r--r--plugins/Toolbox/src/AuthorsModel.py2
-rw-r--r--plugins/Toolbox/src/CloudSync/DiscrepanciesPresenter.py2
-rw-r--r--plugins/Toolbox/src/CloudSync/DownloadPresenter.py2
-rw-r--r--plugins/Toolbox/src/CloudSync/LicensePresenter.py2
-rw-r--r--plugins/Toolbox/src/CloudSync/RestartApplicationPresenter.py2
-rw-r--r--plugins/Toolbox/src/CloudSync/SyncOrchestrator.py4
-rw-r--r--plugins/Toolbox/src/PackagesModel.py2
-rw-r--r--plugins/Toolbox/src/Toolbox.py4
-rw-r--r--plugins/TrimeshReader/TrimeshReader.py4
-rw-r--r--plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDevice.py14
-rw-r--r--plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py2
-rw-r--r--plugins/UM3NetworkPrinting/src/MeshFormatHandler.py8
-rw-r--r--plugins/UM3NetworkPrinting/src/Messages/PrintJobUploadProgressMessage.py2
-rw-r--r--plugins/UM3NetworkPrinting/src/Models/BaseModel.py10
-rw-r--r--plugins/UM3NetworkPrinting/src/Models/Http/CloudClusterResponse.py2
-rw-r--r--plugins/UM3NetworkPrinting/src/Models/Http/CloudClusterStatus.py2
-rw-r--r--plugins/UM3NetworkPrinting/src/Models/Http/CloudError.py2
-rw-r--r--plugins/UM3NetworkPrinting/src/Models/Http/CloudPrintJobResponse.py2
-rw-r--r--plugins/UM3NetworkPrinting/src/Models/Http/CloudPrintJobUploadRequest.py2
-rw-r--r--plugins/UM3NetworkPrinting/src/Models/Http/CloudPrintResponse.py2
-rw-r--r--plugins/UM3NetworkPrinting/src/Models/Http/ClusterBuildPlate.py2
-rw-r--r--plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrintCoreConfiguration.py6
-rw-r--r--plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrintJobConfigurationChange.py2
-rw-r--r--plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrintJobConstraint.py2
-rw-r--r--plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrintJobImpediment.py2
-rw-r--r--plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrintJobStatus.py6
-rw-r--r--plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrinterConfigurationMaterial.py4
-rw-r--r--plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrinterMaterialStation.py2
-rw-r--r--plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrinterMaterialStationSlot.py2
-rw-r--r--plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrinterStatus.py10
-rw-r--r--plugins/UM3NetworkPrinting/src/Network/ClusterApiClient.py18
-rw-r--r--plugins/UM3NetworkPrinting/src/Network/LocalClusterOutputDevice.py10
-rw-r--r--plugins/UM3NetworkPrinting/src/Network/SendMaterialJob.py12
-rw-r--r--plugins/UM3NetworkPrinting/src/Network/ZeroConfClient.py6
-rw-r--r--plugins/UM3NetworkPrinting/src/UM3OutputDevicePlugin.py2
-rw-r--r--plugins/UM3NetworkPrinting/src/UltimakerNetworkedPrinterAction.py2
-rw-r--r--plugins/UM3NetworkPrinting/src/UltimakerNetworkedPrinterOutputDevice.py10
-rw-r--r--plugins/USBPrinting/USBPrinterOutputDevice.py4
-rw-r--r--plugins/USBPrinting/USBPrinterOutputDeviceManager.py2
-rw-r--r--plugins/USBPrinting/avr_isp/intelHex.py2
-rw-r--r--plugins/USBPrinting/avr_isp/ispBase.py2
-rw-r--r--plugins/USBPrinting/avr_isp/stk500v2.py2
-rw-r--r--plugins/UltimakerMachineActions/BedLevelMachineAction.py2
-rw-r--r--plugins/VersionUpgrade/VersionUpgrade41to42/VersionUpgrade41to42.py6
-rw-r--r--plugins/VersionUpgrade/VersionUpgrade42to43/VersionUpgrade42to43.py6
-rw-r--r--plugins/VersionUpgrade/VersionUpgrade43to44/VersionUpgrade43to44.py4
-rw-r--r--plugins/VersionUpgrade/VersionUpgrade44to45/VersionUpgrade44to45.py4
-rw-r--r--plugins/XmlMaterialProfile/XmlMaterialProfile.py12
82 files changed, 203 insertions, 203 deletions
diff --git a/plugins/3MFReader/ThreeMFReader.py b/plugins/3MFReader/ThreeMFReader.py
index 32e12cb91a..546c6fc27b 100755
--- a/plugins/3MFReader/ThreeMFReader.py
+++ b/plugins/3MFReader/ThreeMFReader.py
@@ -59,11 +59,11 @@ class ThreeMFReader(MeshReader):
temp_mat = Matrix()
"""Transformation is saved as:
M00 M01 M02 0.0
-
+
M10 M11 M12 0.0
-
+
M20 M21 M22 0.0
-
+
M30 M31 M32 1.0
We switch the row & cols as that is how everyone else uses matrices!
"""
@@ -87,7 +87,7 @@ class ThreeMFReader(MeshReader):
def _convertSavitarNodeToUMNode(self, savitar_node: Savitar.SceneNode, file_name: str = "") -> Optional[SceneNode]:
"""Convenience function that converts a SceneNode object (as obtained from libSavitar) to a scene node.
-
+
:returns: Scene node.
"""
try:
@@ -252,7 +252,7 @@ class ThreeMFReader(MeshReader):
def _getScaleFromUnit(self, unit: Optional[str]) -> Vector:
"""Create a scale vector based on a unit string.
-
+
.. The core spec defines the following:
* micron
* millimeter (default)
diff --git a/plugins/3MFReader/ThreeMFWorkspaceReader.py b/plugins/3MFReader/ThreeMFWorkspaceReader.py
index 88187cd732..a744d29449 100755
--- a/plugins/3MFReader/ThreeMFWorkspaceReader.py
+++ b/plugins/3MFReader/ThreeMFWorkspaceReader.py
@@ -133,7 +133,7 @@ class ThreeMFWorkspaceReader(WorkspaceReader):
def getNewId(self, old_id: str):
"""Get a unique name based on the old_id. This is different from directly calling the registry in that it caches results.
-
+
This has nothing to do with speed, but with getting consistent new naming for instances & objects.
"""
if old_id not in self._id_mapping:
@@ -142,7 +142,7 @@ class ThreeMFWorkspaceReader(WorkspaceReader):
def _determineGlobalAndExtruderStackFiles(self, project_file_name: str, file_list: List[str]) -> Tuple[str, List[str]]:
"""Separates the given file list into a list of GlobalStack files and a list of ExtruderStack files.
-
+
In old versions, extruder stack files have the same suffix as container stack files ".stack.cfg".
"""
@@ -187,7 +187,7 @@ class ThreeMFWorkspaceReader(WorkspaceReader):
def preRead(self, file_name, show_dialog=True, *args, **kwargs):
"""Read some info so we can make decisions
-
+
:param file_name:
:param show_dialog: In case we use preRead() to check if a file is a valid project file,
we don't want to show a dialog.
@@ -588,12 +588,12 @@ class ThreeMFWorkspaceReader(WorkspaceReader):
@call_on_qt_thread
def read(self, file_name):
"""Read the project file
-
+
Add all the definitions / materials / quality changes that do not exist yet. Then it loads
all the stacks into the container registry. In some cases it will reuse the container for the global stack.
It handles old style project files containing .stack.cfg as well as new style project files
containing global.cfg / extruder.cfg
-
+
:param file_name:
"""
application = CuraApplication.getInstance()
@@ -879,7 +879,7 @@ class ThreeMFWorkspaceReader(WorkspaceReader):
def _createNewQualityChanges(self, quality_type: str, intent_category: Optional[str], name: str, global_stack: GlobalStack, extruder_stack: Optional[ExtruderStack]) -> InstanceContainer:
"""Helper class to create a new quality changes profile.
-
+
This will then later be filled with the appropriate data.
:param quality_type: The quality type of the new profile.
diff --git a/plugins/3MFReader/__init__.py b/plugins/3MFReader/__init__.py
index d68338c35f..5e2b68fce0 100644
--- a/plugins/3MFReader/__init__.py
+++ b/plugins/3MFReader/__init__.py
@@ -33,7 +33,7 @@ def getMetaData() -> Dict:
"description": catalog.i18nc("@item:inlistbox", "3MF File")
}
]
-
+
return metaData
diff --git a/plugins/3MFWriter/ThreeMFWorkspaceWriter.py b/plugins/3MFWriter/ThreeMFWorkspaceWriter.py
index a8d42ab2ee..a7ee47dcf1 100644
--- a/plugins/3MFWriter/ThreeMFWorkspaceWriter.py
+++ b/plugins/3MFWriter/ThreeMFWorkspaceWriter.py
@@ -110,7 +110,7 @@ class ThreeMFWorkspaceWriter(WorkspaceWriter):
@staticmethod
def _writeContainerToArchive(container, archive):
"""Helper function that writes ContainerStacks, InstanceContainers and DefinitionContainers to the archive.
-
+
:param container: That follows the :type{ContainerInterface} to archive.
:param archive: The archive to write to.
"""
diff --git a/plugins/3MFWriter/ThreeMFWriter.py b/plugins/3MFWriter/ThreeMFWriter.py
index 343b94a08b..6c02935080 100644
--- a/plugins/3MFWriter/ThreeMFWriter.py
+++ b/plugins/3MFWriter/ThreeMFWriter.py
@@ -62,7 +62,7 @@ class ThreeMFWriter(MeshWriter):
def setStoreArchive(self, store_archive):
"""Should we store the archive
-
+
Note that if this is true, the archive will not be closed.
The object that set this parameter is then responsible for closing it correctly!
"""
@@ -70,7 +70,7 @@ class ThreeMFWriter(MeshWriter):
def _convertUMNodeToSavitarNode(self, um_node, transformation = Matrix()):
"""Convenience function that converts an Uranium SceneNode object to a SavitarSceneNode
-
+
:returns: Uranium Scene node.
"""
if not isinstance(um_node, SceneNode):
diff --git a/plugins/AMFReader/AMFReader.py b/plugins/AMFReader/AMFReader.py
index 5196119d6c..ef785f2f53 100644
--- a/plugins/AMFReader/AMFReader.py
+++ b/plugins/AMFReader/AMFReader.py
@@ -149,7 +149,7 @@ class AMFReader(MeshReader):
def _toMeshData(self, tri_node: trimesh.base.Trimesh, file_name: str = "") -> MeshData:
"""Converts a Trimesh to Uranium's MeshData.
-
+
:param tri_node: A Trimesh containing the contents of a file that was just read.
:param file_name: The full original filename used to watch for changes
:return: Mesh data from the Trimesh in a way that Uranium can understand it.
diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py
index 1c40052521..519d302618 100755
--- a/plugins/CuraEngineBackend/CuraEngineBackend.py
+++ b/plugins/CuraEngineBackend/CuraEngineBackend.py
@@ -207,7 +207,7 @@ class CuraEngineBackend(QObject, Backend):
printDurationMessage = Signal()
"""Emitted when we get a message containing print duration and material amount.
-
+
This also implies the slicing has finished.
:param time: The amount of time the print will take.
:param material_amount: The amount of material the print will use.
diff --git a/plugins/CuraEngineBackend/ProcessSlicedLayersJob.py b/plugins/CuraEngineBackend/ProcessSlicedLayersJob.py
index 9cd48cdc94..e0a20177b5 100644
--- a/plugins/CuraEngineBackend/ProcessSlicedLayersJob.py
+++ b/plugins/CuraEngineBackend/ProcessSlicedLayersJob.py
@@ -30,7 +30,7 @@ catalog = i18nCatalog("cura")
def colorCodeToRGBA(color_code):
"""Return a 4-tuple with floats 0-1 representing the html color code
-
+
:param color_code: html color code, i.e. "#FF0000" -> red
"""
@@ -55,7 +55,7 @@ class ProcessSlicedLayersJob(Job):
def abort(self):
"""Aborts the processing of layers.
-
+
This abort is made on a best-effort basis, meaning that the actual
job thread will check once in a while to see whether an abort is
requested and then stop processing by itself. There is no guarantee
diff --git a/plugins/CuraProfileReader/CuraProfileReader.py b/plugins/CuraProfileReader/CuraProfileReader.py
index fa65033691..8822e9bb17 100644
--- a/plugins/CuraProfileReader/CuraProfileReader.py
+++ b/plugins/CuraProfileReader/CuraProfileReader.py
@@ -16,21 +16,21 @@ import zipfile
class CuraProfileReader(ProfileReader):
"""A plugin that reads profile data from Cura profile files.
-
+
It reads a profile from a .curaprofile file, and returns it as a profile
instance.
"""
def __init__(self) -> None:
"""Initialises the cura profile reader.
-
+
This does nothing since the only other function is basically stateless.
"""
super().__init__()
def read(self, file_name: str) -> List[Optional[InstanceContainer]]:
"""Reads a cura profile from a file and returns it.
-
+
:param file_name: The file to read the cura profile from.
:return: The cura profiles that were in the file, if any. If the file
could not be read or didn't contain a valid profile, ``None`` is
@@ -59,7 +59,7 @@ class CuraProfileReader(ProfileReader):
def _upgradeProfile(self, serialized: str, profile_id: str) -> List[Tuple[str, str]]:
"""Convert a profile from an old Cura to this Cura if needed.
-
+
:param serialized: The profile data to convert in the serialized on-disk format.
:param profile_id: The name of the profile.
:return: List of serialized profile strings and matching profile names.
@@ -85,7 +85,7 @@ class CuraProfileReader(ProfileReader):
def _loadProfile(self, serialized: str, profile_id: str) -> Optional[InstanceContainer]:
"""Load a profile from a serialized string.
-
+
:param serialized: The profile data to read.
:param profile_id: The name of the profile.
:return: The profile that was stored in the string.
@@ -114,7 +114,7 @@ class CuraProfileReader(ProfileReader):
def _upgradeProfileVersion(self, serialized: str, profile_id: str, main_version: int, setting_version: int) -> List[Tuple[str, str]]:
"""Upgrade a serialized profile to the current profile format.
-
+
:param serialized: The profile data to convert.
:param profile_id: The name of the profile.
:param source_version: The profile version of 'serialized'.
diff --git a/plugins/CuraProfileWriter/CuraProfileWriter.py b/plugins/CuraProfileWriter/CuraProfileWriter.py
index 6643bd8d1f..56f4d07a74 100644
--- a/plugins/CuraProfileWriter/CuraProfileWriter.py
+++ b/plugins/CuraProfileWriter/CuraProfileWriter.py
@@ -11,7 +11,7 @@ class CuraProfileWriter(ProfileWriter):
def write(self, path, profiles):
"""Writes a profile to the specified file path.
-
+
:param path: :type{string} The file to output to.
:param profiles: :type{Profile} :type{List} The profile(s) to write to that file.
:return: True if the writing was successful, or
diff --git a/plugins/FirmwareUpdateChecker/FirmwareUpdateChecker.py b/plugins/FirmwareUpdateChecker/FirmwareUpdateChecker.py
index 92678cb546..8d0670c844 100644
--- a/plugins/FirmwareUpdateChecker/FirmwareUpdateChecker.py
+++ b/plugins/FirmwareUpdateChecker/FirmwareUpdateChecker.py
@@ -20,7 +20,7 @@ i18n_catalog = i18nCatalog("cura")
class FirmwareUpdateChecker(Extension):
"""This Extension checks for new versions of the firmware based on the latest checked version number.
-
+
The plugin is currently only usable for applications maintained by Ultimaker. But it should be relatively easy
to change it to work for other applications.
"""
@@ -62,10 +62,10 @@ class FirmwareUpdateChecker(Extension):
def checkFirmwareVersion(self, container = None, silent = False):
"""Connect with software.ultimaker.com, load latest.version and check version info.
-
+
If the version info is different from the current version, spawn a message to
allow the user to download it.
-
+
:param silent: type(boolean) Suppresses messages other than "new version found" messages.
This is used when checking for a new firmware version at startup.
"""
diff --git a/plugins/GCodeGzReader/GCodeGzReader.py b/plugins/GCodeGzReader/GCodeGzReader.py
index b4d9e85b3e..85a5b01107 100644
--- a/plugins/GCodeGzReader/GCodeGzReader.py
+++ b/plugins/GCodeGzReader/GCodeGzReader.py
@@ -10,7 +10,7 @@ from UM.PluginRegistry import PluginRegistry
class GCodeGzReader(MeshReader):
"""A file reader that reads gzipped g-code.
-
+
If you're zipping g-code, you might as well use gzip!
"""
diff --git a/plugins/GCodeGzWriter/GCodeGzWriter.py b/plugins/GCodeGzWriter/GCodeGzWriter.py
index e9dcbad76b..2bbaaeb0a3 100644
--- a/plugins/GCodeGzWriter/GCodeGzWriter.py
+++ b/plugins/GCodeGzWriter/GCodeGzWriter.py
@@ -16,7 +16,7 @@ catalog = i18nCatalog("cura")
class GCodeGzWriter(MeshWriter):
"""A file writer that writes gzipped g-code.
-
+
If you're zipping g-code, you might as well use gzip!
"""
@@ -26,11 +26,11 @@ class GCodeGzWriter(MeshWriter):
def write(self, stream: BufferedIOBase, nodes: List[SceneNode], mode = MeshWriter.OutputMode.BinaryMode) -> bool:
"""Writes the gzipped g-code to a stream.
-
+
Note that even though the function accepts a collection of nodes, the
entire scene is always written to the file since it is not possible to
separate the g-code for just specific nodes.
-
+
:param stream: The stream to write the gzipped g-code to.
:param nodes: This is ignored.
:param mode: Additional information on what type of stream to use. This
diff --git a/plugins/GCodeProfileReader/GCodeProfileReader.py b/plugins/GCodeProfileReader/GCodeProfileReader.py
index 93bba1db4d..047497e611 100644
--- a/plugins/GCodeProfileReader/GCodeProfileReader.py
+++ b/plugins/GCodeProfileReader/GCodeProfileReader.py
@@ -15,14 +15,14 @@ from cura.ReaderWriters.ProfileReader import ProfileReader, NoProfileException
class GCodeProfileReader(ProfileReader):
"""A class that reads profile data from g-code files.
-
+
It reads the profile data from g-code files and stores it in a new profile.
This class currently does not process the rest of the g-code in any way.
"""
version = 3
"""The file format version of the serialized g-code.
-
+
It can only read settings with the same version as the version it was
written with. If the file format is changed in a way that breaks reverse
compatibility, increment this version number!
@@ -48,7 +48,7 @@ class GCodeProfileReader(ProfileReader):
def read(self, file_name):
"""Reads a g-code file, loading the profile from it.
-
+
:param file_name: The name of the file to read the profile from.
:return: The profile that was in the specified file, if any. If the
specified file was no g-code or contained no parsable profile,
@@ -106,7 +106,7 @@ class GCodeProfileReader(ProfileReader):
def unescapeGcodeComment(string: str) -> str:
"""Unescape a string which has been escaped for use in a gcode comment.
-
+
:param string: The string to unescape.
:return: The unescaped string.
"""
@@ -120,7 +120,7 @@ def unescapeGcodeComment(string: str) -> str:
def readQualityProfileFromString(profile_string) -> Optional[InstanceContainer]:
"""Read in a profile from a serialized string.
-
+
:param profile_string: The profile data in serialized form.
:return: The resulting Profile object or None if it could not be read.
"""
diff --git a/plugins/GCodeReader/FlavorParser.py b/plugins/GCodeReader/FlavorParser.py
index bcb7efc816..2d0bd7b7c0 100644
--- a/plugins/GCodeReader/FlavorParser.py
+++ b/plugins/GCodeReader/FlavorParser.py
@@ -237,7 +237,7 @@ class FlavorParser:
def _gCode92(self, position: Position, params: PositionOptional, path: List[List[Union[float, int]]]) -> Position:
"""Reset the current position to the values specified.
-
+
For example: G92 X10 will set the X to 10 without any physical motion.
"""
diff --git a/plugins/GCodeReader/RepRapFlavorParser.py b/plugins/GCodeReader/RepRapFlavorParser.py
index 05f86beab0..10b7b78587 100644
--- a/plugins/GCodeReader/RepRapFlavorParser.py
+++ b/plugins/GCodeReader/RepRapFlavorParser.py
@@ -21,7 +21,7 @@ class RepRapFlavorParser(FlavorParser.FlavorParser):
def _gCode90(self, position, params, path):
"""Set the absolute positioning
-
+
RepRapFlavor code G90 sets position of X, Y, Z to absolute
For absolute E, M82 is used
"""
@@ -30,7 +30,7 @@ class RepRapFlavorParser(FlavorParser.FlavorParser):
def _gCode91(self, position, params, path):
"""Set the relative positioning
-
+
RepRapFlavor code G91 sets position of X, Y, Z to relative
For relative E, M83 is used
"""
diff --git a/plugins/GCodeWriter/GCodeWriter.py b/plugins/GCodeWriter/GCodeWriter.py
index 93ff0f51ff..160857443b 100644
--- a/plugins/GCodeWriter/GCodeWriter.py
+++ b/plugins/GCodeWriter/GCodeWriter.py
@@ -17,12 +17,12 @@ catalog = i18nCatalog("cura")
class GCodeWriter(MeshWriter):
"""Writes g-code to a file.
-
+
While this poses as a mesh writer, what this really does is take the g-code
in the entire scene and write it to an output device. Since the g-code of a
single mesh isn't separable from the rest what with rafts and travel moves
and all, it doesn't make sense to write just a single mesh.
-
+
So this plug-in takes the g-code that is stored in the root of the scene
node tree, adds a bit of extra information about the profiles and writes
that to the output device.
@@ -30,7 +30,7 @@ class GCodeWriter(MeshWriter):
version = 3
"""The file format version of the serialised g-code.
-
+
It can only read settings with the same version as the version it was
written with. If the file format is changed in a way that breaks reverse
compatibility, increment this version number!
@@ -42,9 +42,9 @@ class GCodeWriter(MeshWriter):
re.escape("\r"): "\\r" # Carriage return. Windows users may need this for visualisation in their editors.
}
"""Dictionary that defines how characters are escaped when embedded in
-
+
g-code.
-
+
Note that the keys of this dictionary are regex strings. The values are
not.
"""
@@ -58,11 +58,11 @@ class GCodeWriter(MeshWriter):
def write(self, stream, nodes, mode = MeshWriter.OutputMode.TextMode):
"""Writes the g-code for the entire scene to a stream.
-
+
Note that even though the function accepts a collection of nodes, the
entire scene is always written to the file since it is not possible to
separate the g-code for just specific nodes.
-
+
:param stream: The stream to write the g-code to.
:param nodes: This is ignored.
:param mode: Additional information on how to format the g-code in the
@@ -117,10 +117,10 @@ class GCodeWriter(MeshWriter):
def _serialiseSettings(self, stack):
"""Serialises a container stack to prepare it for writing at the end of the g-code.
-
+
The settings are serialised, and special characters (including newline)
are escaped.
-
+
:param stack: A container stack to serialise.
:return: A serialised string of the settings.
"""
diff --git a/plugins/LegacyProfileReader/LegacyProfileReader.py b/plugins/LegacyProfileReader/LegacyProfileReader.py
index c67136ce9b..0bc82ad287 100644
--- a/plugins/LegacyProfileReader/LegacyProfileReader.py
+++ b/plugins/LegacyProfileReader/LegacyProfileReader.py
@@ -18,14 +18,14 @@ from cura.ReaderWriters.ProfileReader import ProfileReader # The plug-in type t
class LegacyProfileReader(ProfileReader):
"""A plugin that reads profile data from legacy Cura versions.
-
+
It reads a profile from an .ini file, and performs some translations on it.
Not all translations are correct, mind you, but it is a best effort.
"""
def __init__(self):
"""Initialises the legacy profile reader.
-
+
This does nothing since the only other function is basically stateless.
"""
@@ -33,9 +33,9 @@ class LegacyProfileReader(ProfileReader):
def prepareDefaults(self, json: Dict[str, Dict[str, str]]) -> Dict[str, str]:
"""Prepares the default values of all legacy settings.
-
+
These are loaded from the Dictionary of Doom.
-
+
:param json: The JSON file to load the default setting values from. This
should not be a URL but a pre-loaded JSON handle.
:return: A dictionary of the default values of the legacy Cura version.
@@ -49,13 +49,13 @@ class LegacyProfileReader(ProfileReader):
def prepareLocals(self, config_parser, config_section, defaults):
"""Prepares the local variables that can be used in evaluation of computing
-
+
new setting values from the old ones.
-
+
This fills a dictionary with all settings from the legacy Cura version
and their values, so that they can be used in evaluating the new setting
values as Python code.
-
+
:param config_parser: The ConfigParser that finds the settings in the
legacy profile.
:param config_section: The section in the profile where the settings
@@ -71,7 +71,7 @@ class LegacyProfileReader(ProfileReader):
def read(self, file_name):
"""Reads a legacy Cura profile from a file and returns it.
-
+
:param file_name: The file to read the legacy Cura profile from.
:return: The legacy Cura profile that was in the file, if any. If the
file could not be read or didn't contain a valid profile, None is returned.
diff --git a/plugins/MachineSettingsAction/MachineSettingsAction.py b/plugins/MachineSettingsAction/MachineSettingsAction.py
index c82ef8f351..f3359a1c56 100755
--- a/plugins/MachineSettingsAction/MachineSettingsAction.py
+++ b/plugins/MachineSettingsAction/MachineSettingsAction.py
@@ -25,7 +25,7 @@ catalog = UM.i18n.i18nCatalog("cura")
class MachineSettingsAction(MachineAction):
"""This action allows for certain settings that are "machine only") to be modified.
-
+
It automatically detects machine definitions that it knows how to change and attaches itself to those.
"""
def __init__(self, parent: Optional["QObject"] = None) -> None:
@@ -60,7 +60,7 @@ class MachineSettingsAction(MachineAction):
def _updateHasMaterialsInContainerTree(self) -> None:
"""Triggered when the global container stack changes or when the g-code
-
+
flavour setting is changed.
"""
global_stack = cura.CuraApplication.CuraApplication.getInstance().getGlobalContainerStack()
diff --git a/plugins/ModelChecker/ModelChecker.py b/plugins/ModelChecker/ModelChecker.py
index 138d84cc86..b482667976 100644
--- a/plugins/ModelChecker/ModelChecker.py
+++ b/plugins/ModelChecker/ModelChecker.py
@@ -49,7 +49,7 @@ class ModelChecker(QObject, Extension):
def _pluginsInitialized(self):
"""Called when plug-ins are initialized.
-
+
This makes sure that we listen to changes of the material and that the
button is created that indicates warnings with the current set-up.
"""
diff --git a/plugins/PerObjectSettingsTool/PerObjectSettingVisibilityHandler.py b/plugins/PerObjectSettingsTool/PerObjectSettingVisibilityHandler.py
index c44e4a4df3..445f7ff676 100644
--- a/plugins/PerObjectSettingsTool/PerObjectSettingVisibilityHandler.py
+++ b/plugins/PerObjectSettingsTool/PerObjectSettingVisibilityHandler.py
@@ -17,7 +17,7 @@ from cura.Settings.SettingOverrideDecorator import SettingOverrideDecorator
class PerObjectSettingVisibilityHandler(UM.Settings.Models.SettingVisibilityHandler.SettingVisibilityHandler):
"""The per object setting visibility handler ensures that only setting
-
+
definitions that have a matching instance Container are returned as visible.
"""
def __init__(self, parent = None, *args, **kwargs):
diff --git a/plugins/PerObjectSettingsTool/PerObjectSettingsTool.py b/plugins/PerObjectSettingsTool/PerObjectSettingsTool.py
index d23096c0a3..77f1c33a5f 100644
--- a/plugins/PerObjectSettingsTool/PerObjectSettingsTool.py
+++ b/plugins/PerObjectSettingsTool/PerObjectSettingsTool.py
@@ -14,7 +14,7 @@ from UM.Event import Event
class PerObjectSettingsTool(Tool):
"""This tool allows the user to add & change settings per node in the scene.
-
+
The settings per object are kept in a ContainerStack, which is linked to a node by decorator.
"""
def __init__(self):
@@ -52,7 +52,7 @@ class PerObjectSettingsTool(Tool):
def getSelectedActiveExtruder(self):
"""Gets the active extruder of the currently selected object.
-
+
:return: The active extruder of the currently selected object.
"""
@@ -61,7 +61,7 @@ class PerObjectSettingsTool(Tool):
def setSelectedActiveExtruder(self, extruder_stack_id):
"""Changes the active extruder of the currently selected object.
-
+
:param extruder_stack_id: The ID of the extruder to print the currently
selected object with.
"""
diff --git a/plugins/PostProcessingPlugin/PostProcessingPlugin.py b/plugins/PostProcessingPlugin/PostProcessingPlugin.py
index c1135640dd..90f3d26cd6 100644
--- a/plugins/PostProcessingPlugin/PostProcessingPlugin.py
+++ b/plugins/PostProcessingPlugin/PostProcessingPlugin.py
@@ -132,7 +132,7 @@ class PostProcessingPlugin(QObject, Extension):
def loadAllScripts(self) -> None:
"""Load all scripts from all paths where scripts can be found.
-
+
This should probably only be done on init.
"""
@@ -157,7 +157,7 @@ class PostProcessingPlugin(QObject, Extension):
def loadScripts(self, path: str) -> None:
"""Load all scripts from provided path.
-
+
This should probably only be done on init.
:param path: Path to check for scripts.
"""
@@ -360,7 +360,7 @@ class PostProcessingPlugin(QObject, Extension):
def _propertyChanged(self) -> None:
"""Property changed: trigger re-slice
-
+
To do this we use the global container stack propertyChanged.
Re-slicing is necessary for setting changes in this plugin, because the changes
are applied only once per "fresh" gcode
diff --git a/plugins/PostProcessingPlugin/Script.py b/plugins/PostProcessingPlugin/Script.py
index d15b209478..3228870dca 100644
--- a/plugins/PostProcessingPlugin/Script.py
+++ b/plugins/PostProcessingPlugin/Script.py
@@ -81,7 +81,7 @@ class Script:
def getSettingData(self) -> Dict[str, Any]:
"""Needs to return a dict that can be used to construct a settingcategory file.
-
+
See the example script for an example.
It follows the same style / guides as the Uranium settings.
Scripts can either override getSettingData directly, or use getSettingDataString
@@ -116,7 +116,7 @@ class Script:
def getValue(self, line: str, key: str, default = None) -> Any:
"""Convenience function that finds the value in a line of g-code.
-
+
When requesting key = x from line "G1 X100" the value 100 is returned.
"""
if not key in line or (';' in line and line.find(key) > line.find(';')):
@@ -135,7 +135,7 @@ class Script:
def putValue(self, line: str = "", **kwargs) -> str:
"""Convenience function to produce a line of g-code.
-
+
You can put in an original g-code line and it'll re-use all the values
in that line.
All other keyword parameters are put in the result in g-code's format.
@@ -190,7 +190,7 @@ class Script:
def execute(self, data: List[str]) -> List[str]:
"""This is called when the script is executed.
-
+
It gets a list of g-code strings and needs to return a (modified) list.
"""
raise NotImplementedError()
diff --git a/plugins/PostProcessingPlugin/scripts/ColorMix.py b/plugins/PostProcessingPlugin/scripts/ColorMix.py
index 45b2a0ad70..dacb40e905 100644
--- a/plugins/PostProcessingPlugin/scripts/ColorMix.py
+++ b/plugins/PostProcessingPlugin/scripts/ColorMix.py
@@ -20,7 +20,7 @@
# Uses -
# M163 - Set Mix Factor
# M164 - Save Mix - saves to T2 as a unique mix
-
+
import re #To perform the search and replace.
from ..Script import Script
@@ -127,7 +127,7 @@ class ColorMix(Script):
firstMix = self.getSettingValueByKey("mix_start")
secondMix = self.getSettingValueByKey("mix_finish")
modelOfInterest = self.getSettingValueByKey("object_number")
-
+
#get layer height
layerHeight = 0
for active_layer in data:
@@ -138,11 +138,11 @@ class ColorMix(Script):
break
if layerHeight != 0:
break
-
+
#default layerHeight if not found
if layerHeight == 0:
layerHeight = .2
-
+
#get layers to use
startLayer = 0
endLayer = 0
diff --git a/plugins/PostProcessingPlugin/scripts/DisplayFilenameAndLayerOnLCD.py b/plugins/PostProcessingPlugin/scripts/DisplayFilenameAndLayerOnLCD.py
index cbd131f17e..d589e63fb3 100644
--- a/plugins/PostProcessingPlugin/scripts/DisplayFilenameAndLayerOnLCD.py
+++ b/plugins/PostProcessingPlugin/scripts/DisplayFilenameAndLayerOnLCD.py
@@ -56,7 +56,7 @@ class DisplayFilenameAndLayerOnLCD(Script):
}
}
}"""
-
+
def execute(self, data):
max_layer = 0
if self.getSettingValueByKey("name") != "":
@@ -96,5 +96,5 @@ class DisplayFilenameAndLayerOnLCD(Script):
i += 1
final_lines = "\n".join(lines)
data[layer_index] = final_lines
-
+
return data
diff --git a/plugins/PostProcessingPlugin/scripts/FilamentChange.py b/plugins/PostProcessingPlugin/scripts/FilamentChange.py
index 351b985d49..74b9687f8c 100644
--- a/plugins/PostProcessingPlugin/scripts/FilamentChange.py
+++ b/plugins/PostProcessingPlugin/scripts/FilamentChange.py
@@ -65,7 +65,7 @@ class FilamentChange(Script):
def execute(self, data: List[str]):
"""Inserts the filament change g-code at specific layer numbers.
-
+
:param data: A list of layers of g-code.
:return: A similar list, with filament change commands inserted.
"""
diff --git a/plugins/PostProcessingPlugin/scripts/SearchAndReplace.py b/plugins/PostProcessingPlugin/scripts/SearchAndReplace.py
index b601a037da..a0c3648304 100644
--- a/plugins/PostProcessingPlugin/scripts/SearchAndReplace.py
+++ b/plugins/PostProcessingPlugin/scripts/SearchAndReplace.py
@@ -8,7 +8,7 @@ from ..Script import Script
class SearchAndReplace(Script):
"""Performs a search-and-replace on all g-code.
-
+
Due to technical limitations, the search can't cross the border between
layers.
"""
diff --git a/plugins/PostProcessingPlugin/scripts/UsePreviousProbeMeasurements.py b/plugins/PostProcessingPlugin/scripts/UsePreviousProbeMeasurements.py
index 271cb57100..62989f6c7e 100644
--- a/plugins/PostProcessingPlugin/scripts/UsePreviousProbeMeasurements.py
+++ b/plugins/PostProcessingPlugin/scripts/UsePreviousProbeMeasurements.py
@@ -30,7 +30,7 @@ class UsePreviousProbeMeasurements(Script):
}
}
}"""
-
+
def execute(self, data):
text = "M501 ;load bed level data\nM420 S1 ;enable bed leveling"
if self.getSettingValueByKey("use_previous_measurements"):
diff --git a/plugins/PreviewStage/PreviewStage.py b/plugins/PreviewStage/PreviewStage.py
index deec8b4197..88f432ef9b 100644
--- a/plugins/PreviewStage/PreviewStage.py
+++ b/plugins/PreviewStage/PreviewStage.py
@@ -14,7 +14,7 @@ if TYPE_CHECKING:
class PreviewStage(CuraStage):
"""Displays a preview of what you're about to print.
-
+
The Python component of this stage just loads PreviewMain.qml for display
when the stage is selected, and makes sure that it reverts to the previous
view when the previous stage is activated.
@@ -28,14 +28,14 @@ class PreviewStage(CuraStage):
def onStageSelected(self) -> None:
"""When selecting the stage, remember which was the previous view so that
-
+
we can revert to that view when we go out of the stage later.
"""
self._previously_active_view = self._application.getController().getActiveView()
def onStageDeselected(self) -> None:
"""Called when going to a different stage (away from the Preview Stage).
-
+
When going to a different stage, the view should be reverted to what it
was before. Normally, that just reverts it to solid view.
"""
@@ -46,7 +46,7 @@ class PreviewStage(CuraStage):
def _engineCreated(self) -> None:
"""Delayed load of the QML files.
-
+
We need to make sure that the QML engine is running before we can load
these.
"""
diff --git a/plugins/RemovableDriveOutputDevice/LinuxRemovableDrivePlugin.py b/plugins/RemovableDriveOutputDevice/LinuxRemovableDrivePlugin.py
index 3661bfa63c..7b3363308d 100644
--- a/plugins/RemovableDriveOutputDevice/LinuxRemovableDrivePlugin.py
+++ b/plugins/RemovableDriveOutputDevice/LinuxRemovableDrivePlugin.py
@@ -13,7 +13,7 @@ import subprocess
class LinuxRemovableDrivePlugin(RemovableDrivePlugin.RemovableDrivePlugin):
"""Support for removable devices on Linux.
-
+
TODO: This code uses the most basic interfaces for handling this.
We should instead use UDisks2 to handle mount/unmount and hotplugging events.
"""
diff --git a/plugins/RemovableDriveOutputDevice/RemovableDriveOutputDevice.py b/plugins/RemovableDriveOutputDevice/RemovableDriveOutputDevice.py
index a4fe7309f7..46f38500ee 100644
--- a/plugins/RemovableDriveOutputDevice/RemovableDriveOutputDevice.py
+++ b/plugins/RemovableDriveOutputDevice/RemovableDriveOutputDevice.py
@@ -30,7 +30,7 @@ class RemovableDriveOutputDevice(OutputDevice):
def requestWrite(self, nodes, file_name = None, filter_by_machine = False, file_handler = None, **kwargs):
"""Request the specified nodes to be written to the removable drive.
-
+
:param nodes: A collection of scene nodes that should be written to the
removable drive.
:param file_name: :type{string} A suggestion for the file name to write to.
@@ -38,7 +38,7 @@ class RemovableDriveOutputDevice(OutputDevice):
meshes.
:param limit_mimetypes: Should we limit the available MIME types to the
MIME types available to the currently active machine?
-
+
"""
filter_by_machine = True # This plugin is intended to be used by machine (regardless of what it was told to do)
@@ -110,10 +110,10 @@ class RemovableDriveOutputDevice(OutputDevice):
def _automaticFileName(self, nodes):
"""Generate a file name automatically for the specified nodes to be saved in.
-
+
The name generated will be the name of one of the nodes. Which node that
is can not be guaranteed.
-
+
:param nodes: A collection of nodes for which to generate a file name.
"""
for root in nodes:
diff --git a/plugins/SentryLogger/SentryLogger.py b/plugins/SentryLogger/SentryLogger.py
index 55bcc7e806..29230abb1f 100644
--- a/plugins/SentryLogger/SentryLogger.py
+++ b/plugins/SentryLogger/SentryLogger.py
@@ -20,7 +20,7 @@ class SentryLogger(LogOutput):
# processed and ready for sending.
# Note that this only prepares them for sending. It only sends them when the user actually agrees to sending the
# information.
-
+
_levels = {
"w": "warning",
"i": "info",
@@ -32,10 +32,10 @@ class SentryLogger(LogOutput):
def __init__(self) -> None:
super().__init__()
self._show_once = set() # type: Set[str]
-
+
def log(self, log_type: str, message: str) -> None:
"""Log the message to the sentry hub as a breadcrumb
-
+
:param log_type: "e" (error), "i"(info), "d"(debug), "w"(warning) or "c"(critical) (can postfix with "_once")
:param message: String containing message to be logged
"""
diff --git a/plugins/SliceInfoPlugin/SliceInfo.py b/plugins/SliceInfoPlugin/SliceInfo.py
index a4b17236dd..630c0abb1b 100755
--- a/plugins/SliceInfoPlugin/SliceInfo.py
+++ b/plugins/SliceInfoPlugin/SliceInfo.py
@@ -28,7 +28,7 @@ catalog = i18nCatalog("cura")
class SliceInfo(QObject, Extension):
"""This Extension runs in the background and sends several bits of information to the Ultimaker servers.
-
+
The data is only sent when the user in question gave permission to do so. All data is anonymous and
no model files are being sent (Just a SHA256 hash of the model).
"""
@@ -59,7 +59,7 @@ class SliceInfo(QObject, Extension):
def messageActionTriggered(self, message_id, action_id):
"""Perform action based on user input.
-
+
Note that clicking "Disable" won't actually disable the data sending, but rather take the user to preferences where they can disable it.
"""
self._application.getPreferences().setValue("info/asked_send_slice_info", True)
diff --git a/plugins/Toolbox/src/AuthorsModel.py b/plugins/Toolbox/src/AuthorsModel.py
index 4d1c812981..9a8e7f5dfe 100644
--- a/plugins/Toolbox/src/AuthorsModel.py
+++ b/plugins/Toolbox/src/AuthorsModel.py
@@ -73,7 +73,7 @@ class AuthorsModel(ListModel):
def setFilter(self, filter_dict: Dict[str, str]) -> None:
"""Set the filter of this model based on a string.
-
+
:param filter_dict: Dictionary to do the filtering by.
"""
if filter_dict != self._filter:
diff --git a/plugins/Toolbox/src/CloudSync/DiscrepanciesPresenter.py b/plugins/Toolbox/src/CloudSync/DiscrepanciesPresenter.py
index a168381efa..cee2f6318a 100644
--- a/plugins/Toolbox/src/CloudSync/DiscrepanciesPresenter.py
+++ b/plugins/Toolbox/src/CloudSync/DiscrepanciesPresenter.py
@@ -10,7 +10,7 @@ from .SubscribedPackagesModel import SubscribedPackagesModel
class DiscrepanciesPresenter(QObject):
"""Shows a list of packages to be added or removed. The user can select which packages to (un)install. The user's
-
+
choices are emitted on the `packageMutations` Signal.
"""
diff --git a/plugins/Toolbox/src/CloudSync/DownloadPresenter.py b/plugins/Toolbox/src/CloudSync/DownloadPresenter.py
index 11c1dffcb4..635cd89af2 100644
--- a/plugins/Toolbox/src/CloudSync/DownloadPresenter.py
+++ b/plugins/Toolbox/src/CloudSync/DownloadPresenter.py
@@ -18,7 +18,7 @@ from .SubscribedPackagesModel import SubscribedPackagesModel
class DownloadPresenter:
"""Downloads a set of packages from the Ultimaker Cloud Marketplace
-
+
use download() exactly once: should not be used for multiple sets of downloads since this class contains state
"""
diff --git a/plugins/Toolbox/src/CloudSync/LicensePresenter.py b/plugins/Toolbox/src/CloudSync/LicensePresenter.py
index 8701120cc5..9a68c93d71 100644
--- a/plugins/Toolbox/src/CloudSync/LicensePresenter.py
+++ b/plugins/Toolbox/src/CloudSync/LicensePresenter.py
@@ -45,7 +45,7 @@ class LicensePresenter(QObject):
def present(self, plugin_path: str, packages: Dict[str, Dict[str, str]]) -> None:
"""Show a license dialog for multiple packages where users can read a license and accept or decline them
-
+
:param plugin_path: Root directory of the Toolbox plugin
:param packages: Dict[package id, file path]
"""
diff --git a/plugins/Toolbox/src/CloudSync/RestartApplicationPresenter.py b/plugins/Toolbox/src/CloudSync/RestartApplicationPresenter.py
index 1242bd3b49..d0222029fd 100644
--- a/plugins/Toolbox/src/CloudSync/RestartApplicationPresenter.py
+++ b/plugins/Toolbox/src/CloudSync/RestartApplicationPresenter.py
@@ -5,7 +5,7 @@ from cura.CuraApplication import CuraApplication
class RestartApplicationPresenter:
"""Presents a dialog telling the user that a restart is required to apply changes
-
+
Since we cannot restart Cura, the app is closed instead when the button is clicked
"""
def __init__(self, app: CuraApplication) -> None:
diff --git a/plugins/Toolbox/src/CloudSync/SyncOrchestrator.py b/plugins/Toolbox/src/CloudSync/SyncOrchestrator.py
index 89f20815bf..5693b82ded 100644
--- a/plugins/Toolbox/src/CloudSync/SyncOrchestrator.py
+++ b/plugins/Toolbox/src/CloudSync/SyncOrchestrator.py
@@ -18,7 +18,7 @@ from .SubscribedPackagesModel import SubscribedPackagesModel
class SyncOrchestrator(Extension):
"""Orchestrates the synchronizing of packages from the user account to the installed packages
-
+
Example flow:
- CloudPackageChecker compares a list of packages the user `subscribed` to in their account
@@ -68,7 +68,7 @@ class SyncOrchestrator(Extension):
def _onDownloadFinished(self, success_items: Dict[str, Dict[str, str]], error_items: List[str]) -> None:
"""Called when a set of packages have finished downloading
-
+
:param success_items:: Dict[package_id, Dict[str, str]]
:param error_items:: List[package_id]
"""
diff --git a/plugins/Toolbox/src/PackagesModel.py b/plugins/Toolbox/src/PackagesModel.py
index 4cbabde07e..85811a9eb4 100644
--- a/plugins/Toolbox/src/PackagesModel.py
+++ b/plugins/Toolbox/src/PackagesModel.py
@@ -137,7 +137,7 @@ class PackagesModel(ListModel):
def setFilter(self, filter_dict: Dict[str, str]) -> None:
"""Set the filter of this model based on a string.
-
+
:param filter_dict: Dictionary to do the filtering by.
"""
if filter_dict != self._filter:
diff --git a/plugins/Toolbox/src/Toolbox.py b/plugins/Toolbox/src/Toolbox.py
index 632af456b5..0ad9f7c89c 100644
--- a/plugins/Toolbox/src/Toolbox.py
+++ b/plugins/Toolbox/src/Toolbox.py
@@ -315,7 +315,7 @@ class Toolbox(QObject, Extension):
@pyqtSlot(str)
def checkPackageUsageAndUninstall(self, package_id: str) -> None:
"""Check package usage and uninstall
-
+
If the package is in use, you'll get a confirmation dialog to set everything to default
"""
@@ -359,7 +359,7 @@ class Toolbox(QObject, Extension):
@pyqtSlot()
def resetMaterialsQualitiesAndUninstall(self) -> None:
"""Uses "uninstall variables" to reset qualities and materials, then uninstall
-
+
It's used as an action on Confirm reset on Uninstall
"""
diff --git a/plugins/TrimeshReader/TrimeshReader.py b/plugins/TrimeshReader/TrimeshReader.py
index f746c55cc5..cbec2e2482 100644
--- a/plugins/TrimeshReader/TrimeshReader.py
+++ b/plugins/TrimeshReader/TrimeshReader.py
@@ -83,7 +83,7 @@ class TrimeshReader(MeshReader):
def _read(self, file_name: str) -> Union["SceneNode", List["SceneNode"]]:
"""Reads a file using Trimesh.
-
+
:param file_name: The file path. This is assumed to be one of the file
types that Trimesh can read. It will not be checked again.
:return: A scene node that contains the file's contents.
@@ -136,7 +136,7 @@ class TrimeshReader(MeshReader):
def _toMeshData(self, tri_node: trimesh.base.Trimesh, file_name: str = "") -> MeshData:
"""Converts a Trimesh to Uranium's MeshData.
-
+
:param tri_node: A Trimesh containing the contents of a file that was just read.
:param file_name: The full original filename used to watch for changes
:return: Mesh data from the Trimesh in a way that Uranium can understand it.
diff --git a/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDevice.py b/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDevice.py
index 939b9cce23..b8c5a30524 100644
--- a/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDevice.py
+++ b/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDevice.py
@@ -37,7 +37,7 @@ I18N_CATALOG = i18nCatalog("cura")
class CloudOutputDevice(UltimakerNetworkedPrinterOutputDevice):
"""The cloud output device is a network output device that works remotely but has limited functionality.
-
+
Currently it only supports viewing the printer and print job status and adding a new job to the queue.
As such, those methods have been implemented here.
Note that this device represents a single remote cluster, not a list of multiple clusters.
@@ -60,7 +60,7 @@ class CloudOutputDevice(UltimakerNetworkedPrinterOutputDevice):
def __init__(self, api_client: CloudApiClient, cluster: CloudClusterResponse, parent: QObject = None) -> None:
"""Creates a new cloud output device
-
+
:param api_client: The client that will run the API calls
:param cluster: The device response received from the cloud API.
:param parent: The optional parent of this output device.
@@ -165,7 +165,7 @@ class CloudOutputDevice(UltimakerNetworkedPrinterOutputDevice):
def _onStatusCallFinished(self, status: CloudClusterStatus) -> None:
"""Method called when HTTP request to status endpoint is finished.
-
+
Contains both printers and print jobs statuses in a single response.
"""
self._responseReceived()
@@ -202,7 +202,7 @@ class CloudOutputDevice(UltimakerNetworkedPrinterOutputDevice):
def _onPrintJobCreated(self, job: ExportFileJob) -> None:
"""Handler for when the print job was created locally.
-
+
It can now be sent over the cloud.
"""
output = job.getOutput()
@@ -217,7 +217,7 @@ class CloudOutputDevice(UltimakerNetworkedPrinterOutputDevice):
def _uploadPrintJob(self, job_response: CloudPrintJobResponse) -> None:
"""Uploads the mesh when the print job was registered with the cloud API.
-
+
:param job_response: The response received from the cloud API.
"""
if not self._tool_path:
@@ -236,7 +236,7 @@ class CloudOutputDevice(UltimakerNetworkedPrinterOutputDevice):
def _onPrintUploadCompleted(self, response: CloudPrintResponse) -> None:
"""Shows a message when the upload has succeeded
-
+
:param response: The response from the cloud API.
"""
self._progress.hide()
@@ -245,7 +245,7 @@ class CloudOutputDevice(UltimakerNetworkedPrinterOutputDevice):
def _onUploadError(self, message: str = None) -> None:
"""Displays the given message if uploading the mesh has failed
-
+
:param message: The message to display.
"""
self._progress.hide()
diff --git a/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py b/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py
index 84698ff371..fa1271ab66 100644
--- a/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py
+++ b/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py
@@ -22,7 +22,7 @@ from ..Models.Http.CloudClusterResponse import CloudClusterResponse
class CloudOutputDeviceManager:
"""The cloud output device manager is responsible for using the Ultimaker Cloud APIs to manage remote clusters.
-
+
Keeping all cloud related logic in this class instead of the UM3OutputDevicePlugin results in more readable code.
API spec is available on https://api.ultimaker.com/docs/connect/spec/.
"""
diff --git a/plugins/UM3NetworkPrinting/src/MeshFormatHandler.py b/plugins/UM3NetworkPrinting/src/MeshFormatHandler.py
index 0287d72eb6..7fc1b4a7d3 100644
--- a/plugins/UM3NetworkPrinting/src/MeshFormatHandler.py
+++ b/plugins/UM3NetworkPrinting/src/MeshFormatHandler.py
@@ -32,7 +32,7 @@ class MeshFormatHandler:
@property
def preferred_format(self) -> Dict[str, Union[str, int, bool]]:
"""Chooses the preferred file format.
-
+
:return: A dict with the file format details, with the following keys:
{id: str, extension: str, description: str, mime_type: str, mode: int, hide_in_file_dialog: bool}
"""
@@ -41,7 +41,7 @@ class MeshFormatHandler:
@property
def writer(self) -> Optional[FileWriter]:
"""Gets the file writer for the given file handler and mime type.
-
+
:return: A file writer.
"""
return self._writer
@@ -84,7 +84,7 @@ class MeshFormatHandler:
def _getPreferredFormat(self, firmware_version: str) -> Dict[str, Union[str, int, bool]]:
"""Chooses the preferred file format for the given file handler.
-
+
:param firmware_version: The version of the firmware.
:return: A dict with the file format details.
"""
@@ -121,7 +121,7 @@ class MeshFormatHandler:
def _getWriter(self, mime_type: str) -> Optional[FileWriter]:
"""Gets the file writer for the given file handler and mime type.
-
+
:param mime_type: The mine type.
:return: A file writer.
"""
diff --git a/plugins/UM3NetworkPrinting/src/Messages/PrintJobUploadProgressMessage.py b/plugins/UM3NetworkPrinting/src/Messages/PrintJobUploadProgressMessage.py
index b7ddf7f550..63fa037890 100644
--- a/plugins/UM3NetworkPrinting/src/Messages/PrintJobUploadProgressMessage.py
+++ b/plugins/UM3NetworkPrinting/src/Messages/PrintJobUploadProgressMessage.py
@@ -28,7 +28,7 @@ class PrintJobUploadProgressMessage(Message):
def update(self, percentage: int) -> None:
"""Updates the percentage of the uploaded.
-
+
:param percentage: The percentage amount (0-100).
"""
if not self._visible:
diff --git a/plugins/UM3NetworkPrinting/src/Models/BaseModel.py b/plugins/UM3NetworkPrinting/src/Models/BaseModel.py
index f1385a0270..92d7246489 100644
--- a/plugins/UM3NetworkPrinting/src/Models/BaseModel.py
+++ b/plugins/UM3NetworkPrinting/src/Models/BaseModel.py
@@ -20,7 +20,7 @@ class BaseModel:
def __eq__(self, other):
"""Checks whether the two models are equal.
-
+
:param other: The other model.
:return: True if they are equal, False if they are different.
"""
@@ -28,7 +28,7 @@ class BaseModel:
def __ne__(self, other) -> bool:
"""Checks whether the two models are different.
-
+
:param other: The other model.
:return: True if they are different, False if they are the same.
"""
@@ -42,7 +42,7 @@ class BaseModel:
@staticmethod
def parseModel(model_class: Type[T], values: Union[T, Dict[str, Any]]) -> T:
"""Parses a single model.
-
+
:param model_class: The model class.
:param values: The value of the model, which is usually a dictionary, but may also be already parsed.
:return: An instance of the model_class given.
@@ -54,7 +54,7 @@ class BaseModel:
@classmethod
def parseModels(cls, model_class: Type[T], values: List[Union[T, Dict[str, Any]]]) -> List[T]:
"""Parses a list of models.
-
+
:param model_class: The model class.
:param values: The value of the list. Each value is usually a dictionary, but may also be already parsed.
:return: A list of instances of the model_class given.
@@ -64,7 +64,7 @@ class BaseModel:
@staticmethod
def parseDate(date: Union[str, datetime]) -> datetime:
"""Parses the given date string.
-
+
:param date: The date to parse.
:return: The parsed date.
"""
diff --git a/plugins/UM3NetworkPrinting/src/Models/Http/CloudClusterResponse.py b/plugins/UM3NetworkPrinting/src/Models/Http/CloudClusterResponse.py
index a108b8dc87..94f20b65c6 100644
--- a/plugins/UM3NetworkPrinting/src/Models/Http/CloudClusterResponse.py
+++ b/plugins/UM3NetworkPrinting/src/Models/Http/CloudClusterResponse.py
@@ -13,7 +13,7 @@ class CloudClusterResponse(BaseModel):
host_internal_ip: Optional[str] = None, host_version: Optional[str] = None,
friendly_name: Optional[str] = None, printer_type: str = "ultimaker3", **kwargs) -> None:
"""Creates a new cluster response object.
-
+
:param cluster_id: The secret unique ID, e.g. 'kBEeZWEifXbrXviO8mRYLx45P8k5lHVGs43XKvRniPg='.
:param host_guid: The unique identifier of the print cluster host, e.g. 'e90ae0ac-1257-4403-91ee-a44c9b7e8050'.
:param host_name: The name of the printer as configured during the Wi-Fi setup. Used as identifier for end users.
diff --git a/plugins/UM3NetworkPrinting/src/Models/Http/CloudClusterStatus.py b/plugins/UM3NetworkPrinting/src/Models/Http/CloudClusterStatus.py
index 10f7b0ce6b..5cd151d8ef 100644
--- a/plugins/UM3NetworkPrinting/src/Models/Http/CloudClusterStatus.py
+++ b/plugins/UM3NetworkPrinting/src/Models/Http/CloudClusterStatus.py
@@ -16,7 +16,7 @@ class CloudClusterStatus(BaseModel):
generated_time: Union[str, datetime],
**kwargs) -> None:
"""Creates a new cluster status model object.
-
+
:param printers: The latest status of each printer in the cluster.
:param print_jobs: The latest status of each print job in the cluster.
:param generated_time: The datetime when the object was generated on the server-side.
diff --git a/plugins/UM3NetworkPrinting/src/Models/Http/CloudError.py b/plugins/UM3NetworkPrinting/src/Models/Http/CloudError.py
index 97e7862ff6..05f303e5c9 100644
--- a/plugins/UM3NetworkPrinting/src/Models/Http/CloudError.py
+++ b/plugins/UM3NetworkPrinting/src/Models/Http/CloudError.py
@@ -11,7 +11,7 @@ class CloudError(BaseModel):
def __init__(self, id: str, code: str, title: str, http_status: str, detail: Optional[str] = None,
meta: Optional[Dict[str, Any]] = None, **kwargs) -> None:
"""Creates a new error object.
-
+
:param id: Unique identifier for this particular occurrence of the problem.
:param title: A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence
of the problem, except for purposes of localization.
diff --git a/plugins/UM3NetworkPrinting/src/Models/Http/CloudPrintJobResponse.py b/plugins/UM3NetworkPrinting/src/Models/Http/CloudPrintJobResponse.py
index ccc9ffb2fc..83cbb5a030 100644
--- a/plugins/UM3NetworkPrinting/src/Models/Http/CloudPrintJobResponse.py
+++ b/plugins/UM3NetworkPrinting/src/Models/Http/CloudPrintJobResponse.py
@@ -12,7 +12,7 @@ class CloudPrintJobResponse(BaseModel):
upload_url: Optional[str] = None, content_type: Optional[str] = None,
status_description: Optional[str] = None, slicing_details: Optional[dict] = None, **kwargs) -> None:
"""Creates a new print job response model.
-
+
:param job_id: The job unique ID, e.g. 'kBEeZWEifXbrXviO8mRYLx45P8k5lHVGs43XKvRniPg='.
:param status: The status of the print job.
:param status_description: Contains more details about the status, e.g. the cause of failures.
diff --git a/plugins/UM3NetworkPrinting/src/Models/Http/CloudPrintJobUploadRequest.py b/plugins/UM3NetworkPrinting/src/Models/Http/CloudPrintJobUploadRequest.py
index efa1efb7e4..7e108027d9 100644
--- a/plugins/UM3NetworkPrinting/src/Models/Http/CloudPrintJobUploadRequest.py
+++ b/plugins/UM3NetworkPrinting/src/Models/Http/CloudPrintJobUploadRequest.py
@@ -8,7 +8,7 @@ class CloudPrintJobUploadRequest(BaseModel):
def __init__(self, job_name: str, file_size: int, content_type: str, **kwargs) -> None:
"""Creates a new print job upload request.
-
+
:param job_name: The name of the print job.
:param file_size: The size of the file in bytes.
:param content_type: The content type of the print job (e.g. text/plain or application/gzip)
diff --git a/plugins/UM3NetworkPrinting/src/Models/Http/CloudPrintResponse.py b/plugins/UM3NetworkPrinting/src/Models/Http/CloudPrintResponse.py
index ee2b8a307f..f8b3210210 100644
--- a/plugins/UM3NetworkPrinting/src/Models/Http/CloudPrintResponse.py
+++ b/plugins/UM3NetworkPrinting/src/Models/Http/CloudPrintResponse.py
@@ -12,7 +12,7 @@ class CloudPrintResponse(BaseModel):
def __init__(self, job_id: str, status: str, generated_time: Union[str, datetime],
cluster_job_id: Optional[str] = None, **kwargs) -> None:
"""Creates a new print response object.
-
+
:param job_id: The unique ID of a print job inside of the cluster. This ID is generated by Cura Connect.
:param status: The status of the print request (queued or failed).
:param generated_time: The datetime when the object was generated on the server-side.
diff --git a/plugins/UM3NetworkPrinting/src/Models/Http/ClusterBuildPlate.py b/plugins/UM3NetworkPrinting/src/Models/Http/ClusterBuildPlate.py
index c81e0a372c..771389e102 100644
--- a/plugins/UM3NetworkPrinting/src/Models/Http/ClusterBuildPlate.py
+++ b/plugins/UM3NetworkPrinting/src/Models/Http/ClusterBuildPlate.py
@@ -8,7 +8,7 @@ class ClusterBuildPlate(BaseModel):
def __init__(self, type: str = "glass", **kwargs) -> None:
"""Create a new build plate
-
+
:param type: The type of build plate glass or aluminium
"""
self.type = type
diff --git a/plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrintCoreConfiguration.py b/plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrintCoreConfiguration.py
index 75ce234e23..529f3928fd 100644
--- a/plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrintCoreConfiguration.py
+++ b/plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrintCoreConfiguration.py
@@ -11,14 +11,14 @@ from ..BaseModel import BaseModel
class ClusterPrintCoreConfiguration(BaseModel):
"""Class representing a cloud cluster printer configuration
-
+
Also used for representing slots in a Material Station (as from Cura's perspective these are the same).
"""
def __init__(self, extruder_index: int, material: Union[None, Dict[str, Any],
ClusterPrinterConfigurationMaterial] = None, print_core_id: Optional[str] = None, **kwargs) -> None:
"""Creates a new cloud cluster printer configuration object
-
+
:param extruder_index: The position of the extruder on the machine as list index. Numbered from left to right.
:param material: The material of a configuration object in a cluster printer. May be in a dict or an object.
:param nozzle_diameter: The diameter of the print core at this position in millimeters, e.g. '0.4'.
@@ -32,7 +32,7 @@ class ClusterPrintCoreConfiguration(BaseModel):
def updateOutputModel(self, model: ExtruderOutputModel) -> None:
"""Updates the given output model.
-
+
:param model: The output model to update.
"""
diff --git a/plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrintJobConfigurationChange.py b/plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrintJobConfigurationChange.py
index cdfa633170..0c83cd1b31 100644
--- a/plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrintJobConfigurationChange.py
+++ b/plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrintJobConfigurationChange.py
@@ -12,7 +12,7 @@ class ClusterPrintJobConfigurationChange(BaseModel):
def __init__(self, type_of_change: str, target_id: str, origin_id: str, index: Optional[int] = None,
target_name: Optional[str] = None, origin_name: Optional[str] = None, **kwargs) -> None:
"""Creates a new print job constraint.
-
+
:param type_of_change: The type of configuration change, one of: "material", "print_core_change"
:param index: The hotend slot or extruder index to change
:param target_id: Target material guid or hotend id
diff --git a/plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrintJobConstraint.py b/plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrintJobConstraint.py
index 258d940a03..5271130dd6 100644
--- a/plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrintJobConstraint.py
+++ b/plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrintJobConstraint.py
@@ -10,7 +10,7 @@ class ClusterPrintJobConstraints(BaseModel):
def __init__(self, require_printer_name: Optional[str] = None, **kwargs) -> None:
"""Creates a new print job constraint.
-
+
:param require_printer_name: Unique name of the printer that this job should be printed on.
Should be one of the unique_name field values in the cluster, e.g. 'ultimakersystem-ccbdd30044ec'
"""
diff --git a/plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrintJobImpediment.py b/plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrintJobImpediment.py
index 7beaf6f61f..3c9e03223a 100644
--- a/plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrintJobImpediment.py
+++ b/plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrintJobImpediment.py
@@ -8,7 +8,7 @@ class ClusterPrintJobImpediment(BaseModel):
def __init__(self, translation_key: str, severity: int, **kwargs) -> None:
"""Creates a new print job constraint.
-
+
:param translation_key: A string indicating a reason the print cannot be printed,
such as 'does_not_fit_in_build_volume'
:param severity: A number indicating the severity of the problem, with higher being more severe
diff --git a/plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrintJobStatus.py b/plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrintJobStatus.py
index 9fb94ab12f..8c8b187288 100644
--- a/plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrintJobStatus.py
+++ b/plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrintJobStatus.py
@@ -35,7 +35,7 @@ class ClusterPrintJobStatus(BaseModel):
**kwargs) -> None:
"""Creates a new cloud print job status model.
-
+
:param assigned_to: The name of the printer this job is assigned to while being queued.
:param configuration: The required print core configurations of this print job.
:param constraints: Print job constraints object.
@@ -96,7 +96,7 @@ class ClusterPrintJobStatus(BaseModel):
def createOutputModel(self, controller: ClusterOutputController) -> UM3PrintJobOutputModel:
"""Creates an UM3 print job output model based on this cloud cluster print job.
-
+
:param printer: The output model of the printer
"""
@@ -115,7 +115,7 @@ class ClusterPrintJobStatus(BaseModel):
def updateOutputModel(self, model: UM3PrintJobOutputModel) -> None:
"""Updates an UM3 print job output model based on this cloud cluster print job.
-
+
:param model: The model to update.
"""
diff --git a/plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrinterConfigurationMaterial.py b/plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrinterConfigurationMaterial.py
index 62f99293d1..5d55f2f16b 100644
--- a/plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrinterConfigurationMaterial.py
+++ b/plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrinterConfigurationMaterial.py
@@ -16,7 +16,7 @@ class ClusterPrinterConfigurationMaterial(BaseModel):
material: Optional[str] = None, **kwargs) -> None:
"""Creates a new material configuration model.
-
+
:param brand: The brand of material in this print core, e.g. 'Ultimaker'.
:param color: The color of material in this print core, e.g. 'Blue'.
:param guid: he GUID of the material in this print core, e.g. '506c9f0d-e3aa-4bd4-b2d2-23e2425b1aa9'.
@@ -31,7 +31,7 @@ class ClusterPrinterConfigurationMaterial(BaseModel):
def createOutputModel(self) -> MaterialOutputModel:
"""Creates a material output model based on this cloud printer material.
-
+
A material is chosen that matches the current GUID. If multiple such
materials are available, read-only materials are preferred and the
material with the earliest alphabetical name will be selected.
diff --git a/plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrinterMaterialStation.py b/plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrinterMaterialStation.py
index 1929c2a388..b03a2291c4 100644
--- a/plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrinterMaterialStation.py
+++ b/plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrinterMaterialStation.py
@@ -13,7 +13,7 @@ class ClusterPrinterMaterialStation(BaseModel):
material_slots: List[Union[ClusterPrinterMaterialStationSlot, Dict[str, Any]]] = None,
**kwargs) -> None:
"""Creates a new Material Station status.
-
+
:param status: The status of the material station.
:param: supported: Whether the material station is supported on this machine or not.
:param material_slots: The active slots configurations of this material station.
diff --git a/plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrinterMaterialStationSlot.py b/plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrinterMaterialStationSlot.py
index d41d6c14fc..11e2736ded 100644
--- a/plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrinterMaterialStationSlot.py
+++ b/plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrinterMaterialStationSlot.py
@@ -11,7 +11,7 @@ class ClusterPrinterMaterialStationSlot(ClusterPrintCoreConfiguration):
def __init__(self, slot_index: int, compatible: bool, material_remaining: float,
material_empty: Optional[bool] = False, **kwargs) -> None:
"""Create a new material station slot object.
-
+
:param slot_index: The index of the slot in the material station (ranging 0 to 5).
:param compatible: Whether the configuration is compatible with the print core.
:param material_remaining: How much material is remaining on the spool (between 0 and 1, or -1 for missing data).
diff --git a/plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrinterStatus.py b/plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrinterStatus.py
index 3d342a519d..5b4d7fb161 100644
--- a/plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrinterStatus.py
+++ b/plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrinterStatus.py
@@ -29,7 +29,7 @@ class ClusterPrinterStatus(BaseModel):
build_plate: Union[Dict[str, Any], ClusterBuildPlate] = None,
material_station: Union[Dict[str, Any], ClusterPrinterMaterialStation] = None, **kwargs) -> None:
"""Creates a new cluster printer status
-
+
:param enabled: A printer can be disabled if it should not receive new jobs. By default every printer is enabled.
:param firmware_version: Firmware version installed on the printer. Can differ for each printer in a cluster.
:param friendly_name: Human readable name of the printer. Can be used for identification purposes.
@@ -68,7 +68,7 @@ class ClusterPrinterStatus(BaseModel):
def createOutputModel(self, controller: PrinterOutputController) -> PrinterOutputModel:
"""Creates a new output model.
-
+
:param controller: - The controller of the model.
"""
@@ -82,7 +82,7 @@ class ClusterPrinterStatus(BaseModel):
def updateOutputModel(self, model: PrinterOutputModel) -> None:
"""Updates the given output model.
-
+
:param model: - The output model to update.
"""
@@ -121,7 +121,7 @@ class ClusterPrinterStatus(BaseModel):
def _getSlotsForExtruder(self, extruder_index: int) -> List[ClusterPrinterMaterialStationSlot]:
"""Create a list of Material Station slots for the given extruder index.
-
+
Returns a list with a single empty material slot if none are found to ensure we don't miss configurations.
"""
@@ -136,7 +136,7 @@ class ClusterPrinterStatus(BaseModel):
@staticmethod
def _isSupportedConfiguration(slot: ClusterPrinterMaterialStationSlot, extruder_index: int) -> bool:
"""Check if a configuration is supported in order to make it selectable by the user.
-
+
We filter out any slot that is not supported by the extruder index, print core type or if the material is empty.
"""
diff --git a/plugins/UM3NetworkPrinting/src/Network/ClusterApiClient.py b/plugins/UM3NetworkPrinting/src/Network/ClusterApiClient.py
index 7d6b260b90..d1840bf90c 100644
--- a/plugins/UM3NetworkPrinting/src/Network/ClusterApiClient.py
+++ b/plugins/UM3NetworkPrinting/src/Network/ClusterApiClient.py
@@ -32,7 +32,7 @@ class ClusterApiClient:
def __init__(self, address: str, on_error: Callable) -> None:
"""Initializes a new cluster API client.
-
+
:param address: The network address of the cluster to call.
:param on_error: The callback to be called whenever we receive errors from the server.
"""
@@ -43,7 +43,7 @@ class ClusterApiClient:
def getSystem(self, on_finished: Callable) -> None:
"""Get printer system information.
-
+
:param on_finished: The callback in case the response is successful.
"""
url = "{}/system".format(self.PRINTER_API_PREFIX)
@@ -52,7 +52,7 @@ class ClusterApiClient:
def getMaterials(self, on_finished: Callable[[List[ClusterMaterial]], Any]) -> None:
"""Get the installed materials on the printer.
-
+
:param on_finished: The callback in case the response is successful.
"""
url = "{}/materials".format(self.CLUSTER_API_PREFIX)
@@ -61,7 +61,7 @@ class ClusterApiClient:
def getPrinters(self, on_finished: Callable[[List[ClusterPrinterStatus]], Any]) -> None:
"""Get the printers in the cluster.
-
+
:param on_finished: The callback in case the response is successful.
"""
url = "{}/printers".format(self.CLUSTER_API_PREFIX)
@@ -70,7 +70,7 @@ class ClusterApiClient:
def getPrintJobs(self, on_finished: Callable[[List[ClusterPrintJobStatus]], Any]) -> None:
"""Get the print jobs in the cluster.
-
+
:param on_finished: The callback in case the response is successful.
"""
url = "{}/print_jobs".format(self.CLUSTER_API_PREFIX)
@@ -112,7 +112,7 @@ class ClusterApiClient:
def _createEmptyRequest(self, path: str, content_type: Optional[str] = "application/json") -> QNetworkRequest:
"""We override _createEmptyRequest in order to add the user credentials.
-
+
:param url: The URL to request
:param content_type: The type of the body contents.
"""
@@ -126,7 +126,7 @@ class ClusterApiClient:
@staticmethod
def _parseReply(reply: QNetworkReply) -> Tuple[int, Dict[str, Any]]:
"""Parses the given JSON network reply into a status code and a dictionary, handling unexpected errors as well.
-
+
:param reply: The reply from the server.
:return: A tuple with a status code and a dictionary.
"""
@@ -141,7 +141,7 @@ class ClusterApiClient:
def _parseModels(self, response: Dict[str, Any], on_finished: Union[Callable[[ClusterApiClientModel], Any],
Callable[[List[ClusterApiClientModel]], Any]], model_class: Type[ClusterApiClientModel]) -> None:
"""Parses the given models and calls the correct callback depending on the result.
-
+
:param response: The response from the server, after being converted to a dict.
:param on_finished: The callback in case the response is successful.
:param model_class: The type of the model to convert the response to. It may either be a single record or a list.
@@ -163,7 +163,7 @@ class ClusterApiClient:
Callable[[List[ClusterApiClientModel]], Any]], model: Type[ClusterApiClientModel] = None,
) -> None:
"""Creates a callback function so that it includes the parsing of the response into the correct model.
-
+
The callback is added to the 'finished' signal of the reply.
:param reply: The reply that should be listened to.
:param on_finished: The callback in case the response is successful.
diff --git a/plugins/UM3NetworkPrinting/src/Network/LocalClusterOutputDevice.py b/plugins/UM3NetworkPrinting/src/Network/LocalClusterOutputDevice.py
index ea120f8978..48e552241a 100644
--- a/plugins/UM3NetworkPrinting/src/Network/LocalClusterOutputDevice.py
+++ b/plugins/UM3NetworkPrinting/src/Network/LocalClusterOutputDevice.py
@@ -98,7 +98,7 @@ class LocalClusterOutputDevice(UltimakerNetworkedPrinterOutputDevice):
def setJobState(self, print_job_uuid: str, action: str) -> None:
"""Set the remote print job state.
-
+
:param print_job_uuid: The UUID of the print job to set the state for.
:param action: The action to undertake ('pause', 'resume', 'abort').
"""
@@ -118,7 +118,7 @@ class LocalClusterOutputDevice(UltimakerNetworkedPrinterOutputDevice):
def sendMaterialProfiles(self) -> None:
"""Sync the material profiles in Cura with the printer.
-
+
This gets called when connecting to a printer as well as when sending a print.
"""
job = SendMaterialJob(device = self)
@@ -143,14 +143,14 @@ class LocalClusterOutputDevice(UltimakerNetworkedPrinterOutputDevice):
@pyqtSlot(str, name="selectTargetPrinter")
def selectTargetPrinter(self, unique_name: str = "") -> None:
"""Allows the user to choose a printer to print with from the printer selection dialogue.
-
+
:param unique_name: The unique name of the printer to target.
"""
self._startPrintJobUpload(unique_name if unique_name != "" else None)
def _onPrintJobCreated(self, job: ExportFileJob) -> None:
"""Handler for when the print job was created locally.
-
+
It can now be sent over the network.
"""
@@ -208,7 +208,7 @@ class LocalClusterOutputDevice(UltimakerNetworkedPrinterOutputDevice):
def _onUploadError(self, message: str = None) -> None:
"""Displays the given message if uploading the mesh has failed
-
+
:param message: The message to display.
"""
diff --git a/plugins/UM3NetworkPrinting/src/Network/SendMaterialJob.py b/plugins/UM3NetworkPrinting/src/Network/SendMaterialJob.py
index 90aa68eedb..2740f86605 100644
--- a/plugins/UM3NetworkPrinting/src/Network/SendMaterialJob.py
+++ b/plugins/UM3NetworkPrinting/src/Network/SendMaterialJob.py
@@ -18,7 +18,7 @@ if TYPE_CHECKING:
class SendMaterialJob(Job):
"""Asynchronous job to send material profiles to the printer.
-
+
This way it won't freeze up the interface while sending those materials.
"""
@@ -40,7 +40,7 @@ class SendMaterialJob(Job):
def _sendMissingMaterials(self, remote_materials_by_guid: Dict[str, ClusterMaterial]) -> None:
"""Determine which materials should be updated and send them to the printer.
-
+
:param remote_materials_by_guid: The remote materials by GUID.
"""
local_materials_by_guid = self._getLocalMaterials()
@@ -57,7 +57,7 @@ class SendMaterialJob(Job):
def _determineMaterialsToSend(local_materials: Dict[str, LocalMaterial],
remote_materials: Dict[str, ClusterMaterial]) -> Set[str]:
"""From the local and remote materials, determine which ones should be synchronized.
-
+
Makes a Set of id's containing only the id's of the materials that are not on the printer yet or the ones that
are newer in Cura.
:param local_materials: The local materials by GUID.
@@ -72,7 +72,7 @@ class SendMaterialJob(Job):
def _sendMaterials(self, materials_to_send: Set[str]) -> None:
"""Send the materials to the printer.
-
+
The given materials will be loaded from disk en sent to to printer.
The given id's will be matched with filenames of the locally stored materials.
:param materials_to_send: A set with id's of materials that must be sent.
@@ -97,7 +97,7 @@ class SendMaterialJob(Job):
def _sendMaterialFile(self, file_path: str, file_name: str, material_id: str) -> None:
"""Send a single material file to the printer.
-
+
Also add the material signature file if that is available.
:param file_path: The path of the material file.
:param file_name: The name of the material file.
@@ -143,7 +143,7 @@ class SendMaterialJob(Job):
@staticmethod
def _getLocalMaterials() -> Dict[str, LocalMaterial]:
"""Retrieves a list of local materials
-
+
Only the new newest version of the local materials is returned
:return: a dictionary of LocalMaterial objects by GUID
"""
diff --git a/plugins/UM3NetworkPrinting/src/Network/ZeroConfClient.py b/plugins/UM3NetworkPrinting/src/Network/ZeroConfClient.py
index b41cd7d151..d59f2f2893 100644
--- a/plugins/UM3NetworkPrinting/src/Network/ZeroConfClient.py
+++ b/plugins/UM3NetworkPrinting/src/Network/ZeroConfClient.py
@@ -14,7 +14,7 @@ from cura.CuraApplication import CuraApplication
class ZeroConfClient:
"""The ZeroConfClient handles all network discovery logic.
-
+
It emits signals when new network services were found or disappeared.
"""
@@ -34,7 +34,7 @@ class ZeroConfClient:
def start(self) -> None:
"""The ZeroConf service changed requests are handled in a separate thread so we don't block the UI.
-
+
We can also re-schedule the requests when they fail to get detailed service info.
Any new or re-reschedule requests will be appended to the request queue and the thread will process them.
"""
@@ -108,7 +108,7 @@ class ZeroConfClient:
def _onServiceChanged(self, zero_conf: Zeroconf, service_type: str, name: str,
state_change: ServiceStateChange) -> bool:
"""Handler for zeroConf detection.
-
+
Return True or False indicating if the process succeeded.
Note that this function can take over 3 seconds to complete. Be careful calling it from the main thread.
"""
diff --git a/plugins/UM3NetworkPrinting/src/UM3OutputDevicePlugin.py b/plugins/UM3NetworkPrinting/src/UM3OutputDevicePlugin.py
index 72b2da33cc..44dbfbb5f5 100644
--- a/plugins/UM3NetworkPrinting/src/UM3OutputDevicePlugin.py
+++ b/plugins/UM3NetworkPrinting/src/UM3OutputDevicePlugin.py
@@ -69,7 +69,7 @@ class UM3OutputDevicePlugin(OutputDevicePlugin):
"""Remove a manually connected networked printer."""
self._network_output_device_manager.removeManualDevice(key, address)
-
+
def getDiscoveredDevices(self) -> Dict[str, LocalClusterOutputDevice]:
"""Get the discovered devices from the local network."""
diff --git a/plugins/UM3NetworkPrinting/src/UltimakerNetworkedPrinterAction.py b/plugins/UM3NetworkPrinting/src/UltimakerNetworkedPrinterAction.py
index dd3f3939ed..772a9d1973 100644
--- a/plugins/UM3NetworkPrinting/src/UltimakerNetworkedPrinterAction.py
+++ b/plugins/UM3NetworkPrinting/src/UltimakerNetworkedPrinterAction.py
@@ -17,7 +17,7 @@ I18N_CATALOG = i18nCatalog("cura")
class UltimakerNetworkedPrinterAction(MachineAction):
"""Machine action that allows to connect the active machine to a networked devices.
-
+
TODO: in the future this should be part of the new discovery workflow baked into Cura.
"""
diff --git a/plugins/UM3NetworkPrinting/src/UltimakerNetworkedPrinterOutputDevice.py b/plugins/UM3NetworkPrinting/src/UltimakerNetworkedPrinterOutputDevice.py
index 8090177b83..13aa0d7063 100644
--- a/plugins/UM3NetworkPrinting/src/UltimakerNetworkedPrinterOutputDevice.py
+++ b/plugins/UM3NetworkPrinting/src/UltimakerNetworkedPrinterOutputDevice.py
@@ -24,7 +24,7 @@ from .Models.Http.ClusterPrintJobStatus import ClusterPrintJobStatus
class UltimakerNetworkedPrinterOutputDevice(NetworkedPrinterOutputDevice):
"""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.
"""
@@ -218,7 +218,7 @@ class UltimakerNetworkedPrinterOutputDevice(NetworkedPrinterOutputDevice):
def _checkStillConnected(self) -> None:
"""Check if we're still connected by comparing the last timestamps for network response and the current time.
-
+
This implementation is similar to the base NetworkedPrinterOutputDevice, but is tweaked slightly.
Re-connecting is handled automatically by the output device managers in this plugin.
TODO: it would be nice to have this logic in the managers, but connecting those with signals causes crashes.
@@ -233,7 +233,7 @@ class UltimakerNetworkedPrinterOutputDevice(NetworkedPrinterOutputDevice):
def _reconnectForActiveMachine(self) -> None:
"""Reconnect for the active output device.
-
+
Does nothing if the device is not meant for the active machine.
"""
active_machine = CuraApplication.getInstance().getGlobalContainerStack()
@@ -301,7 +301,7 @@ class UltimakerNetworkedPrinterOutputDevice(NetworkedPrinterOutputDevice):
def _updatePrintJobs(self, remote_jobs: List[ClusterPrintJobStatus]) -> None:
"""Updates the local list of print jobs with the list received from the cluster.
-
+
:param remote_jobs: The print jobs received from the cluster.
"""
self._responseReceived()
@@ -336,7 +336,7 @@ class UltimakerNetworkedPrinterOutputDevice(NetworkedPrinterOutputDevice):
def _createPrintJobModel(self, remote_job: ClusterPrintJobStatus) -> UM3PrintJobOutputModel:
"""Create a new print job model based on the remote status of the job.
-
+
:param remote_job: The remote print job data.
"""
model = remote_job.createOutputModel(ClusterOutputController(self))
diff --git a/plugins/USBPrinting/USBPrinterOutputDevice.py b/plugins/USBPrinting/USBPrinterOutputDevice.py
index 2e52a89713..bfc5385a81 100644
--- a/plugins/USBPrinting/USBPrinterOutputDevice.py
+++ b/plugins/USBPrinting/USBPrinterOutputDevice.py
@@ -118,7 +118,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice):
def requestWrite(self, nodes: List["SceneNode"], file_name: Optional[str] = None, limit_mimetypes: bool = False,
file_handler: Optional["FileHandler"] = None, filter_by_machine: bool = False, **kwargs) -> None:
"""Request the current scene to be sent to a USB-connected printer.
-
+
:param nodes: A collection of scene nodes to send. This is ignored.
:param file_name: A suggestion for a file name to write.
:param filter_by_machine: Whether to filter MIME types by machine. This
@@ -148,7 +148,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice):
def _printGCode(self, gcode: str):
"""Start a print based on a g-code.
-
+
:param gcode: The g-code to print.
"""
self._gcode.clear()
diff --git a/plugins/USBPrinting/USBPrinterOutputDeviceManager.py b/plugins/USBPrinting/USBPrinterOutputDeviceManager.py
index 3ee43e071e..c5a017db7f 100644
--- a/plugins/USBPrinting/USBPrinterOutputDeviceManager.py
+++ b/plugins/USBPrinting/USBPrinterOutputDeviceManager.py
@@ -110,7 +110,7 @@ class USBPrinterOutputDeviceManager(QObject, OutputDevicePlugin):
def getSerialPortList(self, only_list_usb = False):
"""Create a list of serial ports on the system.
-
+
:param only_list_usb: If true, only usb ports are listed
"""
base_list = []
diff --git a/plugins/USBPrinting/avr_isp/intelHex.py b/plugins/USBPrinting/avr_isp/intelHex.py
index 671f1788f7..fc410882dd 100644
--- a/plugins/USBPrinting/avr_isp/intelHex.py
+++ b/plugins/USBPrinting/avr_isp/intelHex.py
@@ -31,7 +31,7 @@ def readHex(filename):
check_sum &= 0xFF
if check_sum != 0:
raise Exception("Checksum error in hex file: " + line)
-
+
if rec_type == 0:#Data record
while len(data) < addr + rec_len:
data.append(0)
diff --git a/plugins/USBPrinting/avr_isp/ispBase.py b/plugins/USBPrinting/avr_isp/ispBase.py
index 077cfc36e6..9ba3a65b47 100644
--- a/plugins/USBPrinting/avr_isp/ispBase.py
+++ b/plugins/USBPrinting/avr_isp/ispBase.py
@@ -22,7 +22,7 @@ class IspBase():
if not self.chip:
raise IspError("Chip with signature: " + str(self.getSignature()) + "not found")
self.chipErase()
-
+
Logger.log("d", "Flashing %i bytes", len(flash_data))
self.writeFlash(flash_data)
Logger.log("d", "Verifying %i bytes", len(flash_data))
diff --git a/plugins/USBPrinting/avr_isp/stk500v2.py b/plugins/USBPrinting/avr_isp/stk500v2.py
index dbfc8dc756..2b1a86155c 100644
--- a/plugins/USBPrinting/avr_isp/stk500v2.py
+++ b/plugins/USBPrinting/avr_isp/stk500v2.py
@@ -56,7 +56,7 @@ class Stk500v2(ispBase.IspBase):
self.close()
raise
self.serial.timeout = 5
-
+
def close(self):
if self.serial is not None:
self.serial.close()
diff --git a/plugins/UltimakerMachineActions/BedLevelMachineAction.py b/plugins/UltimakerMachineActions/BedLevelMachineAction.py
index 7d2eb74f84..f76e0c6746 100644
--- a/plugins/UltimakerMachineActions/BedLevelMachineAction.py
+++ b/plugins/UltimakerMachineActions/BedLevelMachineAction.py
@@ -16,7 +16,7 @@ catalog = i18nCatalog("cura")
class BedLevelMachineAction(MachineAction):
"""A simple action to handle manual bed leveling procedure for printers that don't have it on the firmware.
-
+
This is currently only used by the Ultimaker Original+
"""
diff --git a/plugins/VersionUpgrade/VersionUpgrade41to42/VersionUpgrade41to42.py b/plugins/VersionUpgrade/VersionUpgrade41to42/VersionUpgrade41to42.py
index 39d02c078c..0741312011 100644
--- a/plugins/VersionUpgrade/VersionUpgrade41to42/VersionUpgrade41to42.py
+++ b/plugins/VersionUpgrade/VersionUpgrade41to42/VersionUpgrade41to42.py
@@ -216,13 +216,13 @@ _creality_limited_quality_type = {
class VersionUpgrade41to42(VersionUpgrade):
"""Upgrades configurations from the state they were in at version 4.1 to the
-
+
state they should be in at version 4.2.
"""
def upgradeInstanceContainer(self, serialized: str, filename: str) -> Tuple[List[str], List[str]]:
"""Upgrades instance containers to have the new version number.
-
+
This renames the renamed settings in the containers.
"""
parser = configparser.ConfigParser(interpolation = None, comment_prefixes = ())
@@ -262,7 +262,7 @@ class VersionUpgrade41to42(VersionUpgrade):
def upgradePreferences(self, serialized: str, filename: str) -> Tuple[List[str], List[str]]:
"""Upgrades Preferences to have the new version number.
-
+
This renames the renamed settings in the list of visible settings.
"""
diff --git a/plugins/VersionUpgrade/VersionUpgrade42to43/VersionUpgrade42to43.py b/plugins/VersionUpgrade/VersionUpgrade42to43/VersionUpgrade42to43.py
index 7359e88179..73d6578c9b 100644
--- a/plugins/VersionUpgrade/VersionUpgrade42to43/VersionUpgrade42to43.py
+++ b/plugins/VersionUpgrade/VersionUpgrade42to43/VersionUpgrade42to43.py
@@ -59,7 +59,7 @@ _renamed_settings = {
class VersionUpgrade42to43(VersionUpgrade):
"""Upgrades configurations from the state they were in at version 4.2 to the
-
+
state they should be in at version 4.3.
"""
def upgradePreferences(self, serialized: str, filename: str):
@@ -79,14 +79,14 @@ class VersionUpgrade42to43(VersionUpgrade):
parser["general"]["visible_settings"] = ";".join(all_setting_keys)
parser["metadata"]["setting_version"] = "9"
-
+
result = io.StringIO()
parser.write(result)
return [filename], [result.getvalue()]
def upgradeInstanceContainer(self, serialized: str, filename: str) -> Tuple[List[str], List[str]]:
"""Upgrades instance containers to have the new version number.
-
+
This renames the renamed settings in the containers.
"""
parser = configparser.ConfigParser(interpolation = None, comment_prefixes = ())
diff --git a/plugins/VersionUpgrade/VersionUpgrade43to44/VersionUpgrade43to44.py b/plugins/VersionUpgrade/VersionUpgrade43to44/VersionUpgrade43to44.py
index 249f55a42c..ec0a767105 100644
--- a/plugins/VersionUpgrade/VersionUpgrade43to44/VersionUpgrade43to44.py
+++ b/plugins/VersionUpgrade/VersionUpgrade43to44/VersionUpgrade43to44.py
@@ -29,7 +29,7 @@ class VersionUpgrade43to44(VersionUpgrade):
def upgradePreferences(self, serialized: str, filename: str) -> Tuple[List[str], List[str]]:
"""Upgrades Preferences to have the new version number.
-
+
This renames the renamed settings in the list of visible settings.
"""
@@ -45,7 +45,7 @@ class VersionUpgrade43to44(VersionUpgrade):
def upgradeInstanceContainer(self, serialized: str, filename: str) -> Tuple[List[str], List[str]]:
"""Upgrades instance containers to have the new version number.
-
+
This renames the renamed settings in the containers.
"""
parser = configparser.ConfigParser(interpolation = None, comment_prefixes = ())
diff --git a/plugins/VersionUpgrade/VersionUpgrade44to45/VersionUpgrade44to45.py b/plugins/VersionUpgrade/VersionUpgrade44to45/VersionUpgrade44to45.py
index df4f95d74d..00faa216eb 100644
--- a/plugins/VersionUpgrade/VersionUpgrade44to45/VersionUpgrade44to45.py
+++ b/plugins/VersionUpgrade/VersionUpgrade44to45/VersionUpgrade44to45.py
@@ -124,7 +124,7 @@ class VersionUpgrade44to45(VersionUpgrade):
def upgradePreferences(self, serialized: str, filename: str) -> Tuple[List[str], List[str]]:
"""Upgrades Preferences to have the new version number.
-
+
This renames the renamed settings in the list of visible settings.
"""
@@ -140,7 +140,7 @@ class VersionUpgrade44to45(VersionUpgrade):
def upgradeInstanceContainer(self, serialized: str, filename: str) -> Tuple[List[str], List[str]]:
"""Upgrades instance containers to have the new version number.
-
+
This renames the renamed settings in the containers.
"""
parser = configparser.ConfigParser(interpolation = None, comment_prefixes = ())
diff --git a/plugins/XmlMaterialProfile/XmlMaterialProfile.py b/plugins/XmlMaterialProfile/XmlMaterialProfile.py
index 0b21b57fef..7978c0cdba 100644
--- a/plugins/XmlMaterialProfile/XmlMaterialProfile.py
+++ b/plugins/XmlMaterialProfile/XmlMaterialProfile.py
@@ -38,11 +38,11 @@ class XmlMaterialProfile(InstanceContainer):
@staticmethod
def xmlVersionToSettingVersion(xml_version: str) -> int:
"""Translates the version number in the XML files to the setting_version metadata entry.
-
+
Since the two may increment independently we need a way to say which
versions of the XML specification are compatible with our setting data
version numbers.
-
+
:param xml_version: The version number found in an XML file.
:return: The corresponding setting_version.
"""
@@ -56,7 +56,7 @@ class XmlMaterialProfile(InstanceContainer):
def setMetaDataEntry(self, key, value, apply_to_all = True):
"""set the meta data for all machine / variant combinations
-
+
The "apply_to_all" flag indicates whether this piece of metadata should be applied to all material containers
or just this specific container.
For example, when you change the material name, you want to apply it to all its derived containers, but for
@@ -95,7 +95,7 @@ class XmlMaterialProfile(InstanceContainer):
def setName(self, new_name):
"""Overridden from InstanceContainer, similar to setMetaDataEntry.
-
+
without this function the setName would only set the name of the specific nozzle / material / machine combination container
The function is a bit tricky. It will not set the name of all containers if it has the correct name itself.
"""
@@ -130,7 +130,7 @@ class XmlMaterialProfile(InstanceContainer):
def serialize(self, ignored_metadata_keys: Optional[Set[str]] = None):
"""Overridden from InstanceContainer
-
+
base file: common settings + supported machines
machine / variant combination: only changes for itself.
"""
@@ -1075,7 +1075,7 @@ class XmlMaterialProfile(InstanceContainer):
@classmethod
def getProductIdMap(cls) -> Dict[str, List[str]]:
"""Gets a mapping from product names in the XML files to their definition IDs.
-
+
This loads the mapping from a file.
"""