From 8f5e56c66ec39502b569c20e147ff93fba006d9c Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 7 Jul 2016 15:22:27 +0200 Subject: [PATCH] Make documentation specify filename without extension Contributes to issue CURA-844. --- .../VersionUpgrade21to22/MachineInstance.py | 6 ++++-- .../VersionUpgrade/VersionUpgrade21to22/Preferences.py | 6 ++++-- plugins/VersionUpgrade/VersionUpgrade21to22/Profile.py | 4 ++-- .../VersionUpgrade21to22/VersionUpgrade21to22.py | 9 ++++++--- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/plugins/VersionUpgrade/VersionUpgrade21to22/MachineInstance.py b/plugins/VersionUpgrade/VersionUpgrade21to22/MachineInstance.py index 46003d4d21..a7534dc862 100644 --- a/plugins/VersionUpgrade/VersionUpgrade21to22/MachineInstance.py +++ b/plugins/VersionUpgrade/VersionUpgrade21to22/MachineInstance.py @@ -10,7 +10,8 @@ import io #To write config files to strings as if they were files. # instance in version 1 of the file format. # # \param serialised The serialised form of a machine instance in version 1. -# \param filename The supposed file name of this machine instance. +# \param filename The supposed file name of this machine instance, without +# extension. # \return A machine instance instance, or None if the file format is # incorrect. def importFrom(serialised, filename): @@ -24,7 +25,8 @@ def importFrom(serialised, filename): class MachineInstance: ## Reads version 1 of the file format, storing it in memory. # - # \param serialised A string with the contents of a machine instance file. + # \param serialised A string with the contents of a machine instance file, + # without extension. # \param filename The supposed file name of this machine instance. def __init__(self, serialised, filename): self._filename = filename diff --git a/plugins/VersionUpgrade/VersionUpgrade21to22/Preferences.py b/plugins/VersionUpgrade/VersionUpgrade21to22/Preferences.py index 2fcacedbf6..9f6a36d87a 100644 --- a/plugins/VersionUpgrade/VersionUpgrade21to22/Preferences.py +++ b/plugins/VersionUpgrade/VersionUpgrade21to22/Preferences.py @@ -10,7 +10,8 @@ import UM.VersionUpgrade #To indicate that a file is of the wrong format. # in version 1 of the file format. # # \param serialised The serialised form of a preferences file in version 1. -# \param filename The supposed filename of the preferences file. +# \param filename The supposed filename of the preferences file, without +# extension. # \return A representation of those preferences, or None if the file format is # incorrect. def importFrom(serialised, filename): @@ -25,7 +26,8 @@ class Preferences: ## Reads version 2 of the preferences file format, storing it in memory. # # \param serialised A serialised version 2 preferences file. - # \param filename The supposed filename of the preferences file. + # \param filename The supposed filename of the preferences file, without + # extension. def __init__(self, serialised, filename): self._filename = filename diff --git a/plugins/VersionUpgrade/VersionUpgrade21to22/Profile.py b/plugins/VersionUpgrade/VersionUpgrade21to22/Profile.py index 2f911d755d..621f346887 100644 --- a/plugins/VersionUpgrade/VersionUpgrade21to22/Profile.py +++ b/plugins/VersionUpgrade/VersionUpgrade21to22/Profile.py @@ -10,7 +10,7 @@ import UM.VersionUpgrade # of the file format. # # \param serialised The serialised form of a profile in version 1. -# \param filename The supposed filename of the profile. +# \param filename The supposed filename of the profile, without extension. # \return A profile instance, or None if the file format is incorrect. def importFrom(serialised, filename): try: @@ -24,7 +24,7 @@ class Profile: ## Reads version 1 of the file format, storing it in memory. # # \param serialised A string with the contents of a profile. - # \param filename The supposed filename of the profile. + # \param filename The supposed filename of the profile, without extension. def __init__(self, serialised, filename): self._filename = filename diff --git a/plugins/VersionUpgrade/VersionUpgrade21to22/VersionUpgrade21to22.py b/plugins/VersionUpgrade/VersionUpgrade21to22/VersionUpgrade21to22.py index ae2356d720..a45a4a6e79 100644 --- a/plugins/VersionUpgrade/VersionUpgrade21to22/VersionUpgrade21to22.py +++ b/plugins/VersionUpgrade/VersionUpgrade21to22/VersionUpgrade21to22.py @@ -66,7 +66,8 @@ class VersionUpgrade21to22(VersionUpgrade): ## Converts machine instances from format version 1 to version 2. # # \param serialised The serialised machine instance in version 1. - # \param filename The supposed file name of the machine instance. + # \param filename The supposed file name of the machine instance, without + # extension. # \return A tuple containing the new filename and the serialised machine # instance in version 2, or None if the input was not of the correct # format. @@ -79,7 +80,8 @@ class VersionUpgrade21to22(VersionUpgrade): ## Converts preferences from format version 2 to version 3. # # \param serialised The serialised preferences file in version 2. - # \param filename THe supposed file name of the preferences file. + # \param filename THe supposed file name of the preferences file, without + # extension. # \return A tuple containing the new filename and the serialised # preferences in version 3, or None if the input was not of the correct # format. @@ -92,7 +94,8 @@ class VersionUpgrade21to22(VersionUpgrade): ## Converts profiles from format version 1 to version 2. # # \param serialised The serialised profile in version 1. - # \param filename The supposed file name of the profile. + # \param filename The supposed file name of the profile, without + # extension. # \return A tuple containing the new filename and the serialised profile # in version 2, or None if the input was not of the correct format. def upgradeProfile(self, serialised, filename):