Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
nallath committed Jan 31, 2024
2 parents 36f1932 + 816d71b commit 00f8f87
Show file tree
Hide file tree
Showing 30 changed files with 32 additions and 58 deletions.
3 changes: 0 additions & 3 deletions plugins/3MFWriter/ThreeMFWriter.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,8 @@
from UM.Logger import Logger
from UM.Math.Matrix import Matrix
from UM.Application import Application
from UM.Message import Message
from UM.Resources import Resources
from UM.Scene.SceneNode import SceneNode
from UM.Settings.ContainerRegistry import ContainerRegistry
from UM.Settings.EmptyInstanceContainer import EmptyInstanceContainer

from cura.CuraApplication import CuraApplication
from cura.CuraPackageManager import CuraPackageManager
Expand Down
1 change: 0 additions & 1 deletion plugins/DigitalLibrary/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Copyright (c) 2021 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.

from UM.MimeTypeDatabase import MimeType, MimeTypeDatabase
from .src import DigitalFactoryFileProvider, DigitalFactoryOutputDevicePlugin, DigitalFactoryController


Expand Down
1 change: 0 additions & 1 deletion plugins/DigitalLibrary/src/DigitalFactoryApiClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

import json
from json import JSONDecodeError
import re
from time import time
from typing import List, Any, Optional, Union, Type, Tuple, Dict, cast, TypeVar, Callable

Expand Down
1 change: 0 additions & 1 deletion plugins/DigitalLibrary/src/DigitalFactoryProjectModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

from PyQt6.QtCore import Qt, pyqtSignal

from UM.Logger import Logger
from UM.Qt.ListModel import ListModel
from .DigitalFactoryProjectResponse import DigitalFactoryProjectResponse

Expand Down
1 change: 0 additions & 1 deletion plugins/GCodeGzWriter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# Cura is released under the terms of the LGPLv3 or higher.

from UM.i18n import i18nCatalog
from UM.Platform import Platform

from . import GCodeGzWriter

Expand Down
1 change: 0 additions & 1 deletion plugins/GCodeWriter/GCodeWriter.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from cura.Machines.ContainerTree import ContainerTree

from UM.i18n import i18nCatalog
from cura.Settings.CuraStackBuilder import CuraStackBuilder

catalog = i18nCatalog("cura")

Expand Down
2 changes: 0 additions & 2 deletions plugins/Marketplace/MissingPackageList.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@

from typing import Optional, TYPE_CHECKING, Dict, List

from .Constants import PACKAGES_URL
from .PackageModel import PackageModel
from .RemotePackageList import RemotePackageList
from PyQt6.QtCore import pyqtSignal, QObject, pyqtProperty, QCoreApplication

from UM.TaskManagement.HttpRequestManager import HttpRequestManager # To request the package list from the API.
from UM.i18n import i18nCatalog

if TYPE_CHECKING:
Expand Down
2 changes: 0 additions & 2 deletions plugins/Marketplace/PackageModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# Cura is released under the terms of the LGPLv3 or higher.

import re
from enum import Enum
from typing import Any, cast, Dict, List, Optional

from PyQt6.QtCore import pyqtProperty, QObject, pyqtSignal, pyqtSlot
Expand All @@ -12,7 +11,6 @@
from cura.CuraPackageManager import CuraPackageManager
from cura.Settings.CuraContainerRegistry import CuraContainerRegistry # To get names of materials we're compatible with.
from UM.i18n import i18nCatalog # To translate placeholder names if data is not present.
from UM.Logger import Logger
from UM.PluginRegistry import PluginRegistry

catalog = i18nCatalog("cura")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from UM.Logger import Logger
import UM.Settings.Models.SettingVisibilityHandler

from cura.Settings.ExtruderManager import ExtruderManager #To get global-inherits-stack setting values from different extruders.
from cura.Settings.ExtruderManager import ExtruderManager # To get global-inherits-stack setting values from different extruders.
from cura.Settings.SettingOverrideDecorator import SettingOverrideDecorator


Expand Down
2 changes: 1 addition & 1 deletion plugins/PostProcessingPlugin/scripts/ColorMix.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# M163 - Set Mix Factor
# M164 - Save Mix - saves to T2 as a unique mix

import re #To perform the search and replace.
import re # To perform the search and replace.
from ..Script import Script

class ColorMix(Script):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
# Description: This plugin is now an option in 'Display Info on LCD'

from ..Script import Script
from UM.Application import Application
from UM.Message import Message

class DisplayFilenameAndLayerOnLCD(Script):
Expand Down
3 changes: 0 additions & 3 deletions plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@
from ..Script import Script
from UM.Application import Application
from UM.Qt.Duration import DurationFormat
import UM.Util
import configparser
from UM.Preferences import Preferences
import time
import datetime
import math
Expand Down
2 changes: 0 additions & 2 deletions plugins/PostProcessingPlugin/scripts/DisplayProgressOnLCD.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

from ..Script import Script

import re
import datetime
from UM.Message import Message

class DisplayProgressOnLCD(Script):
Expand Down
2 changes: 1 addition & 1 deletion plugins/PostProcessingPlugin/scripts/FilamentChange.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from typing import List
from ..Script import Script

from UM.Application import Application #To get the current printer's settings.
from UM.Application import Application # To get the current printer's settings.

class FilamentChange(Script):

Expand Down
2 changes: 1 addition & 1 deletion plugins/PostProcessingPlugin/scripts/PauseAtHeight.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from ..Script import Script
import re
from UM.Application import Application #To get the current printer's settings.
from UM.Application import Application # To get the current printer's settings.
from UM.Logger import Logger

from typing import List, Tuple
Expand Down
2 changes: 1 addition & 1 deletion plugins/PostProcessingPlugin/scripts/SearchAndReplace.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) 2017 Ghostkeeper
# The PostProcessingPlugin is released under the terms of the LGPLv3 or higher.

import re #To perform the search and replace.
import re # To perform the search and replace.

from ..Script import Script

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from UM.Logger import Logger
from UM.Message import Message
from UM.FileHandler.WriteFileJob import WriteFileJob
from UM.FileHandler.FileWriter import FileWriter #To check against the write modes (text vs. binary).
from UM.FileHandler.FileWriter import FileWriter # To check against the write modes (text vs. binary).
from UM.Scene.Iterator.BreadthFirstIterator import BreadthFirstIterator
from UM.OutputDevice.OutputDevice import OutputDevice
from UM.OutputDevice import OutputDeviceError
Expand Down
2 changes: 1 addition & 1 deletion plugins/SliceInfoPlugin/SliceInfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import os
import platform
import time
from typing import cast, Optional, Set, TYPE_CHECKING
from typing import Optional, Set, TYPE_CHECKING

from PyQt6.QtCore import pyqtSlot, QObject
from PyQt6.QtNetwork import QNetworkRequest
Expand Down
2 changes: 0 additions & 2 deletions plugins/SolidView/SolidView.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
from UM.Logger import Logger
from UM.Message import Message
from UM.Math.Color import Color
from UM.PluginRegistry import PluginRegistry
from UM.Platform import Platform
from UM.Event import Event

from UM.View.RenderBatch import RenderBatch
Expand Down
1 change: 0 additions & 1 deletion plugins/UFPWriter/UFPWriter.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
from UM.Scene.SceneNode import SceneNode
from UM.Settings.InstanceContainer import InstanceContainer
from cura.CuraApplication import CuraApplication
from cura.Settings.CuraStackBuilder import CuraStackBuilder
from cura.Settings.GlobalStack import GlobalStack
from cura.Utils.Threading import call_on_qt_thread

Expand Down
4 changes: 2 additions & 2 deletions plugins/UFPWriter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
except ImportError:
Logger.log("w", "Could not import UFPWriter; libCharon may be missing")

from UM.i18n import i18nCatalog #To translate the file format description.
from UM.Mesh.MeshWriter import MeshWriter #For the binary mode flag.
from UM.i18n import i18nCatalog # To translate the file format description.
from UM.Mesh.MeshWriter import MeshWriter # For the binary mode flag.

i18n_catalog = i18nCatalog("cura")

Expand Down
3 changes: 0 additions & 3 deletions plugins/USBPrinting/AutoDetectBaudJob.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
from UM.Job import Job
from UM.Logger import Logger

from .avr_isp import ispBase
from .avr_isp.stk500v2 import Stk500v2

from time import time, sleep
from serial import Serial, SerialException

Expand Down
8 changes: 4 additions & 4 deletions plugins/USBPrinting/USBPrinterOutputDevice.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

from UM.i18n import i18nCatalog
from UM.Logger import Logger
from UM.Mesh.MeshWriter import MeshWriter #To get the g-code output.
from UM.Message import Message #Show an error when already printing.
from UM.PluginRegistry import PluginRegistry #To get the g-code output.
from UM.Mesh.MeshWriter import MeshWriter # To get the g-code output.
from UM.Message import Message # Show an error when already printing.
from UM.PluginRegistry import PluginRegistry # To get the g-code output.
from UM.Qt.Duration import DurationFormat

from cura.CuraApplication import CuraApplication
Expand All @@ -19,7 +19,7 @@
from .AutoDetectBaudJob import AutoDetectBaudJob
from .AvrFirmwareUpdater import AvrFirmwareUpdater

from io import StringIO #To write the g-code output.
from io import StringIO # To write the g-code output.
from queue import Queue
from serial import Serial, SerialException, SerialTimeoutException
from threading import Thread, Event
Expand Down
14 changes: 7 additions & 7 deletions plugins/VersionUpgrade/VersionUpgrade21to22/MachineInstance.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Copyright (c) 2018 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.

import configparser #To read config files.
import io #To write config files to strings as if they were files.
import os.path #To get the path to write new user profiles to.
import configparser # To read config files.
import io # To write config files to strings as if they were files.
import os.path # To get the path to write new user profiles to.
from typing import Dict, List, Optional, Set, Tuple
import urllib #To serialise the user container file name properly.
import urllib # To serialise the user container file name properly.
import urllib.parse

import UM.VersionUpgrade #To indicate that a file is of incorrect format.
import UM.VersionUpgradeManager #To schedule more files to be upgraded.
from UM.Resources import Resources #To get the config storage path.
import UM.VersionUpgrade # To indicate that a file is of incorrect format.
import UM.VersionUpgradeManager # To schedule more files to be upgraded.
from UM.Resources import Resources # To get the config storage path.

## Creates a new machine instance instance by parsing a serialised machine
# instance in version 1 of the file format.
Expand Down
6 changes: 3 additions & 3 deletions plugins/VersionUpgrade/VersionUpgrade21to22/Preferences.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Copyright (c) 2018 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.

import configparser #To read config files.
import io #To output config files to string.
import configparser # To read config files.
import io # To output config files to string.
from typing import List, Optional, Tuple

import UM.VersionUpgrade #To indicate that a file is of the wrong format.
import UM.VersionUpgrade # To indicate that a file is of the wrong format.

## Creates a new preferences instance by parsing a serialised preferences file
# in version 1 of the file format.
Expand Down
4 changes: 2 additions & 2 deletions plugins/VersionUpgrade/VersionUpgrade21to22/Profile.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Copyright (c) 2018 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.

import configparser #To read config files.
import io #To write config files to strings as if they were files.
import configparser # To read config files.
import io # To write config files to strings as if they were files.
from typing import Dict, List, Optional, Tuple

import UM.VersionUpgrade
Expand Down
1 change: 0 additions & 1 deletion plugins/XRayView/XRayView.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from UM.Application import Application
from UM.Logger import Logger
from UM.Math.Color import Color
from UM.PluginRegistry import PluginRegistry
from UM.Resources import Resources
from UM.Platform import Platform
from UM.Event import Event
Expand Down
6 changes: 3 additions & 3 deletions plugins/XmlMaterialProfile/XmlMaterialProfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

import copy
import io
import json #To parse the product-to-id mapping file.
import os.path #To find the product-to-id mapping.
from typing import Any, Dict, List, Optional, Tuple, cast, Set, Union
import json # To parse the product-to-id mapping file.
import os.path # To find the product-to-id mapping.
from typing import Any, Dict, List, Optional, Tuple, cast, Set
import xml.etree.ElementTree as ET

from UM.PluginRegistry import PluginRegistry
Expand Down
3 changes: 1 addition & 2 deletions scripts/fix_translation_memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
import argparse
from pathlib import Path
from fuzzywuzzy import fuzz
from fuzzywuzzy import process
import xml.etree.ElementTree as ET
from xml.sax.saxutils import unescape, escape, quoteattr
from xml.sax.saxutils import unescape


def load_existing_xmtm(path: Path) -> ET.Element:
Expand Down
6 changes: 3 additions & 3 deletions scripts/lionbridge_import.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Copyright (c) 2021 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.

import argparse #To get the source directory from command line arguments.
import argparse # To get the source directory from command line arguments.
import io # To fix encoding issues in Windows
import os #To find files from the source.
import os.path #To find files from the source and the destination path.
import os # To find files from the source.
import os.path # To find files from the source and the destination path.

cura_files = {"cura", "fdmprinter.def.json", "fdmextruder.def.json"}
uranium_files = {"uranium"}
Expand Down

0 comments on commit 00f8f87

Please sign in to comment.