mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Code style: Space around binary operators
I just looked for lines with interpolation = None because I was looking for another possible bug, but fixing this in the meanwhile too.
This commit is contained in:
parent
e3861b0d90
commit
4c6744b6fc
7 changed files with 10 additions and 10 deletions
|
@ -685,7 +685,7 @@ class CuraContainerRegistry(ContainerRegistry):
|
||||||
if not os.path.isfile(file_path):
|
if not os.path.isfile(file_path):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
parser = configparser.ConfigParser(interpolation=None)
|
parser = configparser.ConfigParser(interpolation = None)
|
||||||
try:
|
try:
|
||||||
parser.read([file_path])
|
parser.read([file_path])
|
||||||
except:
|
except:
|
||||||
|
|
|
@ -1012,7 +1012,7 @@ class ThreeMFWorkspaceReader(WorkspaceReader):
|
||||||
|
|
||||||
## Get the list of ID's of all containers in a container stack by partially parsing it's serialized data.
|
## Get the list of ID's of all containers in a container stack by partially parsing it's serialized data.
|
||||||
def _getContainerIdListFromSerialized(self, serialized):
|
def _getContainerIdListFromSerialized(self, serialized):
|
||||||
parser = ConfigParser(interpolation=None, empty_lines_in_values=False)
|
parser = ConfigParser(interpolation = None, empty_lines_in_values = False)
|
||||||
parser.read_string(serialized)
|
parser.read_string(serialized)
|
||||||
|
|
||||||
container_ids = []
|
container_ids = []
|
||||||
|
@ -1033,7 +1033,7 @@ class ThreeMFWorkspaceReader(WorkspaceReader):
|
||||||
return container_ids
|
return container_ids
|
||||||
|
|
||||||
def _getMachineNameFromSerializedStack(self, serialized):
|
def _getMachineNameFromSerializedStack(self, serialized):
|
||||||
parser = ConfigParser(interpolation=None, empty_lines_in_values=False)
|
parser = ConfigParser(interpolation = None, empty_lines_in_values = False)
|
||||||
parser.read_string(serialized)
|
parser.read_string(serialized)
|
||||||
return parser["general"].get("name", "")
|
return parser["general"].get("name", "")
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ class CuraProfileReader(ProfileReader):
|
||||||
# \param profile_id \type{str} The name of the profile.
|
# \param profile_id \type{str} The name of the profile.
|
||||||
# \return \type{List[Tuple[str,str]]} List of serialized profile strings and matching profile names.
|
# \return \type{List[Tuple[str,str]]} List of serialized profile strings and matching profile names.
|
||||||
def _upgradeProfile(self, serialized, profile_id):
|
def _upgradeProfile(self, serialized, profile_id):
|
||||||
parser = configparser.ConfigParser(interpolation=None)
|
parser = configparser.ConfigParser(interpolation = None)
|
||||||
parser.read_string(serialized)
|
parser.read_string(serialized)
|
||||||
|
|
||||||
if "general" not in parser:
|
if "general" not in parser:
|
||||||
|
|
|
@ -152,7 +152,7 @@ class LegacyProfileReader(ProfileReader):
|
||||||
profile.setDirty(True)
|
profile.setDirty(True)
|
||||||
|
|
||||||
#Serialise and deserialise in order to perform the version upgrade.
|
#Serialise and deserialise in order to perform the version upgrade.
|
||||||
parser = configparser.ConfigParser(interpolation=None)
|
parser = configparser.ConfigParser(interpolation = None)
|
||||||
data = profile.serialize()
|
data = profile.serialize()
|
||||||
parser.read_string(data)
|
parser.read_string(data)
|
||||||
parser["general"]["version"] = "1"
|
parser["general"]["version"] = "1"
|
||||||
|
|
|
@ -73,7 +73,7 @@ class VersionUpgrade22to24(VersionUpgrade):
|
||||||
|
|
||||||
def __convertVariant(self, variant_path):
|
def __convertVariant(self, variant_path):
|
||||||
# Copy the variant to the machine_instances/*_settings.inst.cfg
|
# Copy the variant to the machine_instances/*_settings.inst.cfg
|
||||||
variant_config = configparser.ConfigParser(interpolation=None)
|
variant_config = configparser.ConfigParser(interpolation = None)
|
||||||
with open(variant_path, "r", encoding = "utf-8") as fhandle:
|
with open(variant_path, "r", encoding = "utf-8") as fhandle:
|
||||||
variant_config.read_file(fhandle)
|
variant_config.read_file(fhandle)
|
||||||
|
|
||||||
|
|
|
@ -117,7 +117,7 @@ class VersionUpgrade25to26(VersionUpgrade):
|
||||||
# \param serialised The serialised form of a quality profile.
|
# \param serialised The serialised form of a quality profile.
|
||||||
# \param filename The name of the file to upgrade.
|
# \param filename The name of the file to upgrade.
|
||||||
def upgradeMachineStack(self, serialised, filename):
|
def upgradeMachineStack(self, serialised, filename):
|
||||||
parser = configparser.ConfigParser(interpolation=None)
|
parser = configparser.ConfigParser(interpolation = None)
|
||||||
parser.read_string(serialised)
|
parser.read_string(serialised)
|
||||||
|
|
||||||
# NOTE: This is for Custom FDM printers
|
# NOTE: This is for Custom FDM printers
|
||||||
|
|
|
@ -84,7 +84,7 @@ class VersionUpgrade30to31(VersionUpgrade):
|
||||||
# \param serialised The serialised form of a preferences file.
|
# \param serialised The serialised form of a preferences file.
|
||||||
# \param filename The name of the file to upgrade.
|
# \param filename The name of the file to upgrade.
|
||||||
def upgradePreferences(self, serialised, filename):
|
def upgradePreferences(self, serialised, filename):
|
||||||
parser = configparser.ConfigParser(interpolation=None)
|
parser = configparser.ConfigParser(interpolation = None)
|
||||||
parser.read_string(serialised)
|
parser.read_string(serialised)
|
||||||
|
|
||||||
# Update version numbers
|
# Update version numbers
|
||||||
|
@ -105,7 +105,7 @@ class VersionUpgrade30to31(VersionUpgrade):
|
||||||
# \param serialised The serialised form of the container file.
|
# \param serialised The serialised form of the container file.
|
||||||
# \param filename The name of the file to upgrade.
|
# \param filename The name of the file to upgrade.
|
||||||
def upgradeInstanceContainer(self, serialised, filename):
|
def upgradeInstanceContainer(self, serialised, filename):
|
||||||
parser = configparser.ConfigParser(interpolation=None)
|
parser = configparser.ConfigParser(interpolation = None)
|
||||||
parser.read_string(serialised)
|
parser.read_string(serialised)
|
||||||
|
|
||||||
for each_section in ("general", "metadata"):
|
for each_section in ("general", "metadata"):
|
||||||
|
@ -130,7 +130,7 @@ class VersionUpgrade30to31(VersionUpgrade):
|
||||||
# \param serialised The serialised form of a container stack.
|
# \param serialised The serialised form of a container stack.
|
||||||
# \param filename The name of the file to upgrade.
|
# \param filename The name of the file to upgrade.
|
||||||
def upgradeStack(self, serialised, filename):
|
def upgradeStack(self, serialised, filename):
|
||||||
parser = configparser.ConfigParser(interpolation=None)
|
parser = configparser.ConfigParser(interpolation = None)
|
||||||
parser.read_string(serialised)
|
parser.read_string(serialised)
|
||||||
|
|
||||||
for each_section in ("general", "metadata"):
|
for each_section in ("general", "metadata"):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue