mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 22:54:01 -06:00
Codestyle: Start comments with space
We didn't really discuss this one, but apparently it's in PEP8 so I'd better do it. Contributes to issue CURA-844.
This commit is contained in:
parent
0e92929be4
commit
7ad2fbc95d
3 changed files with 19 additions and 19 deletions
|
@ -26,9 +26,9 @@ class MachineInstance:
|
|||
# \param serialised A string with the contents of a machine instance file.
|
||||
def __init__(self, serialised):
|
||||
config = configparser.ConfigParser(interpolation = None)
|
||||
config.read_string(serialised) #Read the input string as config file.
|
||||
config.read_string(serialised) # Read the input string as config file.
|
||||
|
||||
#Checking file correctness.
|
||||
# Checking file correctness.
|
||||
if not config.has_section("general"):
|
||||
raise SettingsError.InvalidFormatError("general")
|
||||
if not config.has_option("general", "version"):
|
||||
|
@ -37,7 +37,7 @@ class MachineInstance:
|
|||
raise SettingsError.InvalidFormatError("general/name")
|
||||
if not config.has_option("general", "type"):
|
||||
raise SettingsError.InvalidFormatError("general/type")
|
||||
if int(config.get("general", "version")) != 1: #Explicitly hard-code version 1, since if this number changes the programmer MUST change this entire function.
|
||||
if int(config.get("general", "version")) != 1: # Explicitly hard-code version 1, since if this number changes the programmer MUST change this entire function.
|
||||
raise SettingsError.InvalidVersionError("Version upgrade intermediary version 1")
|
||||
|
||||
self._type_name = config.get("general", "type")
|
||||
|
@ -58,13 +58,13 @@ class MachineInstance:
|
|||
# \return A serialised form of this machine instance, serialised in
|
||||
# version 2 of the file format.
|
||||
def exportVersion2(self):
|
||||
import VersionUpgrade21to22 #Import here to prevent circular dependencies.
|
||||
config = configparser.ConfigParser(interpolation = None) #Build a config file in the form of version 2.
|
||||
import VersionUpgrade21to22 # Import here to prevent circular dependencies.
|
||||
config = configparser.ConfigParser(interpolation = None) # Build a config file in the form of version 2.
|
||||
|
||||
config.add_section("general")
|
||||
config.set("general", "name", self._name)
|
||||
config.set("general", "type", self._type_name)
|
||||
config.set("general", "version", "2") #Hard-code version 2, since if this number changes the programmer MUST change this entire function.
|
||||
config.set("general", "version", "2") # Hard-code version 2, since if this number changes the programmer MUST change this entire function.
|
||||
if self._variant_name:
|
||||
config.set("general", "variant", self._variant_name)
|
||||
if self._key:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue