diff options
author | Remco Burema <41987080+rburema@users.noreply.github.com> | 2022-08-30 13:42:53 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-30 13:42:53 +0300 |
commit | 3074d3cb1cbde370071856998b356a087dc5c57a (patch) | |
tree | abb8ddb7b5199a1e7307b378cd85efded8bb3ab3 | |
parent | 437d94ccea6ca01334709d7175e54f59c5706223 (diff) |
Apply suggestions from code review
done as part of CURA-9289
Co-authored-by: Jelle Spijker <j.spijker@ultimaker.com>
-rw-r--r-- | plugins/VersionUpgrade/VersionUpgrade50to52/VersionUpgrade50to52.py | 6 | ||||
-rw-r--r-- | plugins/VersionUpgrade/VersionUpgrade50to52/__init__.py | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/plugins/VersionUpgrade/VersionUpgrade50to52/VersionUpgrade50to52.py b/plugins/VersionUpgrade/VersionUpgrade50to52/VersionUpgrade50to52.py index 2f8ba31097..6825b701a4 100644 --- a/plugins/VersionUpgrade/VersionUpgrade50to52/VersionUpgrade50to52.py +++ b/plugins/VersionUpgrade/VersionUpgrade50to52/VersionUpgrade50to52.py @@ -10,6 +10,7 @@ from cura.Settings.CuraStackBuilder import CuraStackBuilder from cura.Settings.GlobalStack import GlobalStack import io + class VersionUpgrade50to52(VersionUpgrade): """ Upgrades configurations from the state they were in at version 5.0 to the @@ -22,8 +23,7 @@ class VersionUpgrade50to52(VersionUpgrade): Upgrades container stacks for FLSun Racer to change their profiles. :param serialized: The original contents of the container stack. :param original_filename: The file name of the container stack. - :return: A list of file names, and a list of the new contents for those - files. + :return: A list of file names, and a list of the new contents for those files. """ parser = configparser.ConfigParser(interpolation = None) @@ -38,7 +38,7 @@ class VersionUpgrade50to52(VersionUpgrade): connection_types = [] if "metadata" in parser and "connection_type" in parser["metadata"]: - connection_types = [int(connection_type) for connection_type in parser["metadata"]["connection_type"].split(",")] + connection_types = [ConnectionType(connection_type) for connection_type in parser["metadata"]["connection_type"].split(",")] cloud_connection_types = ConnectionType.NetworkConnection, ConnectionType.CloudConnection diff --git a/plugins/VersionUpgrade/VersionUpgrade50to52/__init__.py b/plugins/VersionUpgrade/VersionUpgrade50to52/__init__.py index 4b1d2bc92b..4314fd0fd7 100644 --- a/plugins/VersionUpgrade/VersionUpgrade50to52/__init__.py +++ b/plugins/VersionUpgrade/VersionUpgrade50to52/__init__.py @@ -25,4 +25,4 @@ def getMetaData() -> Dict[str, Any]: def register(_app: "Application") -> Dict[str, Any]: - return {"version_upgrade": upgrade} + return { "version_upgrade": upgrade } |