mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-23 06:09:38 +08:00
Make documentation specify filename without extension
Contributes to issue CURA-844.
This commit is contained in:
parent
e6efba3868
commit
8f5e56c66e
@ -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.
|
# instance in version 1 of the file format.
|
||||||
#
|
#
|
||||||
# \param serialised The serialised form of a machine instance in version 1.
|
# \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
|
# \return A machine instance instance, or None if the file format is
|
||||||
# incorrect.
|
# incorrect.
|
||||||
def importFrom(serialised, filename):
|
def importFrom(serialised, filename):
|
||||||
@ -24,7 +25,8 @@ def importFrom(serialised, filename):
|
|||||||
class MachineInstance:
|
class MachineInstance:
|
||||||
## Reads version 1 of the file format, storing it in memory.
|
## 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.
|
# \param filename The supposed file name of this machine instance.
|
||||||
def __init__(self, serialised, filename):
|
def __init__(self, serialised, filename):
|
||||||
self._filename = filename
|
self._filename = filename
|
||||||
|
@ -10,7 +10,8 @@ import UM.VersionUpgrade #To indicate that a file is of the wrong format.
|
|||||||
# in version 1 of the file format.
|
# in version 1 of the file format.
|
||||||
#
|
#
|
||||||
# \param serialised The serialised form of a preferences file in version 1.
|
# \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
|
# \return A representation of those preferences, or None if the file format is
|
||||||
# incorrect.
|
# incorrect.
|
||||||
def importFrom(serialised, filename):
|
def importFrom(serialised, filename):
|
||||||
@ -25,7 +26,8 @@ class Preferences:
|
|||||||
## Reads version 2 of the preferences file format, storing it in memory.
|
## Reads version 2 of the preferences file format, storing it in memory.
|
||||||
#
|
#
|
||||||
# \param serialised A serialised version 2 preferences file.
|
# \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):
|
def __init__(self, serialised, filename):
|
||||||
self._filename = filename
|
self._filename = filename
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ import UM.VersionUpgrade
|
|||||||
# of the file format.
|
# of the file format.
|
||||||
#
|
#
|
||||||
# \param serialised The serialised form of a profile in version 1.
|
# \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.
|
# \return A profile instance, or None if the file format is incorrect.
|
||||||
def importFrom(serialised, filename):
|
def importFrom(serialised, filename):
|
||||||
try:
|
try:
|
||||||
@ -24,7 +24,7 @@ class Profile:
|
|||||||
## Reads version 1 of the file format, storing it in memory.
|
## Reads version 1 of the file format, storing it in memory.
|
||||||
#
|
#
|
||||||
# \param serialised A string with the contents of a profile.
|
# \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):
|
def __init__(self, serialised, filename):
|
||||||
self._filename = filename
|
self._filename = filename
|
||||||
|
|
||||||
|
@ -66,7 +66,8 @@ class VersionUpgrade21to22(VersionUpgrade):
|
|||||||
## Converts machine instances from format version 1 to version 2.
|
## Converts machine instances from format version 1 to version 2.
|
||||||
#
|
#
|
||||||
# \param serialised The serialised machine instance in version 1.
|
# \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
|
# \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
|
# instance in version 2, or None if the input was not of the correct
|
||||||
# format.
|
# format.
|
||||||
@ -79,7 +80,8 @@ class VersionUpgrade21to22(VersionUpgrade):
|
|||||||
## Converts preferences from format version 2 to version 3.
|
## Converts preferences from format version 2 to version 3.
|
||||||
#
|
#
|
||||||
# \param serialised The serialised preferences file in version 2.
|
# \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
|
# \return A tuple containing the new filename and the serialised
|
||||||
# preferences in version 3, or None if the input was not of the correct
|
# preferences in version 3, or None if the input was not of the correct
|
||||||
# format.
|
# format.
|
||||||
@ -92,7 +94,8 @@ class VersionUpgrade21to22(VersionUpgrade):
|
|||||||
## Converts profiles from format version 1 to version 2.
|
## Converts profiles from format version 1 to version 2.
|
||||||
#
|
#
|
||||||
# \param serialised The serialised profile in version 1.
|
# \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
|
# \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.
|
# in version 2, or None if the input was not of the correct format.
|
||||||
def upgradeProfile(self, serialised, filename):
|
def upgradeProfile(self, serialised, filename):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user