Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'cura/ReaderWriters/ProfileWriter.py')
-rw-r--r--cura/ReaderWriters/ProfileWriter.py34
1 files changed, 20 insertions, 14 deletions
diff --git a/cura/ReaderWriters/ProfileWriter.py b/cura/ReaderWriters/ProfileWriter.py
index 5f81dc28c3..987924ccbf 100644
--- a/cura/ReaderWriters/ProfileWriter.py
+++ b/cura/ReaderWriters/ProfileWriter.py
@@ -3,23 +3,29 @@
from UM.PluginObject import PluginObject
-## Base class for profile writer plugins.
-#
-# This class defines a write() function to write profiles to files with.
+
class ProfileWriter(PluginObject):
- ## Initialises the profile writer.
- #
- # This currently doesn't do anything since the writer is basically static.
+ """Base class for profile writer plugins.
+
+ This class defines a write() function to write profiles to files with.
+ """
+
def __init__(self):
+ """Initialises the profile writer.
+
+ This currently doesn't do anything since the writer is basically static.
+ """
+
super().__init__()
- ## Writes a profile to the specified file path.
- #
- # The profile writer may write its own file format to the specified file.
- #
- # \param path \type{string} The file to output to.
- # \param profiles \type{Profile} or \type{List} The profile(s) to write to the file.
- # \return \code True \endcode if the writing was successful, or \code
- # False \endcode if it wasn't.
def write(self, path, profiles):
+ """Writes a profile to the specified file path.
+
+ The profile writer may write its own file format to the specified file.
+
+ :param path: :type{string} The file to output to.
+ :param profiles: :type{Profile} or :type{List} The profile(s) to write to the file.
+ :return: True if the writing was successful, or False if it wasn't.
+ """
+
raise NotImplementedError("Profile writer plugin was not correctly implemented. No write was specified.")