Browse Source

Applied requested changes proposed by @ninovanhooff

Fixed a couple of missed double quotes, trailing and leading spaces, to long comment lines
Jelle Spijker 4 years ago
parent
commit
679739d09d

+ 1 - 1
cura/API/Account.py

@@ -27,7 +27,7 @@ class Account(QObject):
       api = CuraAPI()
       api.account.login()
       api.account.logout()
-      api.account.userProfile    Who is logged in``
+      api.account.userProfile    # Who is logged in
     """
 
     loginStateChanged = pyqtSignal(bool)

+ 1 - 1
cura/API/Backups.py

@@ -20,7 +20,7 @@ class Backups:
        from cura.API import CuraAPI
        api = CuraAPI()
        api.backups.createBackup()
-       api.backups.restoreBackup(my_zip_file, {"cura_release": "3.1"})``
+       api.backups.restoreBackup(my_zip_file, {"cura_release": "3.1"})
     """
 
     def __init__(self, application: "CuraApplication") -> None:

+ 1 - 1
cura/API/Interface/Settings.py

@@ -26,7 +26,7 @@ class Settings:
        "actions": my_menu_actions,
        "menu_item": MyPluginAction(self)
        }
-       api.interface.settings.addContextMenuItem(data)``
+       api.interface.settings.addContextMenuItem(data)
     """
 
     def __init__(self, application: "CuraApplication") -> None:

+ 6 - 6
cura/Arranging/Arrange.py

@@ -99,7 +99,7 @@ class Arrange:
         self._last_priority = 0
 
     def findNodePlacement(self, node: SceneNode, offset_shape_arr: ShapeArray, hull_shape_arr: ShapeArray, step = 1) -> bool:
-        """ Find placement for a node (using offset shape) and place it (using hull shape)
+        """Find placement for a node (using offset shape) and place it (using hull shape)
 
         :param node: The node to be placed
         :param offset_shape_arr: shape array with offset, for placing the shape
@@ -134,7 +134,7 @@ class Arrange:
         return found_spot
 
     def centerFirst(self):
-        """ Fill priority, center is best. Lower value is better. """
+        """Fill priority, center is best. Lower value is better. """
 
         # Square distance: creates a more round shape
         self._priority = numpy.fromfunction(
@@ -143,7 +143,7 @@ class Arrange:
         self._priority_unique_values.sort()
 
     def backFirst(self):
-        """ Fill priority, back is best. Lower value is better """
+        """Fill priority, back is best. Lower value is better """
 
         self._priority = numpy.fromfunction(
             lambda j, i: 10 * j + abs(self._offset_x - i), self._shape, dtype=numpy.int32)
@@ -151,7 +151,7 @@ class Arrange:
         self._priority_unique_values.sort()
 
     def checkShape(self, x, y, shape_arr) -> Optional[numpy.ndarray]:
-        """ Return the amount of "penalty points" for polygon, which is the sum of priority
+        """Return the amount of "penalty points" for polygon, which is the sum of priority
 
         :param x: x-coordinate to check shape
         :param y: y-coordinate to check shape
@@ -183,7 +183,7 @@ class Arrange:
         return numpy.sum(prio_slice[numpy.where(shape_arr.arr == 1)])
 
     def bestSpot(self, shape_arr, start_prio = 0, step = 1) -> LocationSuggestion:
-        """ Find "best" spot for ShapeArray
+        """Find "best" spot for ShapeArray
 
         :param shape_arr: shape array
         :param start_prio: Start with this priority value (and skip the ones before)
@@ -213,7 +213,7 @@ class Arrange:
         return LocationSuggestion(x = None, y = None, penalty_points = None, priority = priority)  # No suitable location found :-(
 
     def place(self, x, y, shape_arr, update_empty = True):
-        """ Place the object.
+        """Place the object.
 
         Marks the locations in self._occupied and self._priority
 

+ 3 - 3
cura/BuildVolume.py

@@ -885,7 +885,7 @@ class BuildVolume(SceneNode):
         
         It computes different disallowed areas depending on the offset of the extruder. The resulting dictionary will
          therefore have an entry for each extruder that is used.
-        
+
         :param border_size: The size with which to offset the disallowed areas due to skirt, brim, travel avoid distance
          , etc.
         :param used_extruders: The extruder stacks to generate disallowed areas for.
@@ -1117,8 +1117,8 @@ class BuildVolume(SceneNode):
     def getEdgeDisallowedSize(self):
         """Calculate the disallowed radius around the edge.
         
-        This disallowed radius is to allow for space around the models that is not part of the collision radius, such as
-         bed adhesion (skirt/brim/raft) and travel avoid distance.
+        This disallowed radius is to allow for space around the models that is not part of the collision radius,
+        such as bed adhesion (skirt/brim/raft) and travel avoid distance.
         """
 
         if not self._global_container_stack or not self._global_container_stack.extruderList:

+ 3 - 4
cura/CuraApplication.py

@@ -440,8 +440,7 @@ class CuraApplication(QtApplication):
 
     def __setLatestResouceVersionsForVersionUpgrade(self):
         """Initializes the version upgrade manager with by providing the paths for each resource type and the latest
-        versions.
-        """
+        versions. """
 
         self._version_upgrade_manager.setCurrentVersions(
             {
@@ -645,7 +644,7 @@ class CuraApplication(QtApplication):
 
     showMessageBox = pyqtSignal(str,str, str, str, int, int,
                                 arguments = ["title", "text", "informativeText", "detailedText","buttons", "icon"])
-    """ A reusable dialogbox"""
+    """A reusable dialogbox"""
 
     def messageBox(self, title, text,
                    informativeText = "",
@@ -1873,7 +1872,7 @@ class CuraApplication(QtApplication):
 
     @pyqtSlot(str, result=bool)
     def checkIsValidProjectFile(self, file_url):
-        """ Checks if the given file URL is a valid project file. """
+        """Checks if the given file URL is a valid project file. """
 
         file_path = QUrl(file_url).toLocalFile()
         workspace_reader = self.getWorkspaceFileHandler().getReaderForFile(file_path)

+ 2 - 2
cura/LayerDataBuilder.py

@@ -46,8 +46,8 @@ class LayerDataBuilder(MeshBuilder):
     def build(self, material_color_map, line_type_brightness = 1.0):
         """Return the layer data as :py:class:`cura.LayerData.LayerData`.
         
-        :param material_color_map:: [r, g, b, a] for each extruder row.
-        :param line_type_brightness:: compatibility layer view uses line type brightness of 0.5
+        :param material_color_map: [r, g, b, a] for each extruder row.
+        :param line_type_brightness: compatibility layer view uses line type brightness of 0.5
         """
 
         vertex_count = 0

+ 9 - 9
cura/LayerPolygon.py

@@ -91,15 +91,15 @@ class LayerPolygon:
         
         The arrays are either by vertex or by indices.
         
-        :param vertex_offset: : determines where to start and end filling the arrays
-        :param index_offset: : determines where to start and end filling the arrays
-        :param vertices: : vertex numpy array to be filled
-        :param colors: : vertex numpy array to be filled
-        :param line_dimensions: : vertex numpy array to be filled
-        :param feedrates: : vertex numpy array to be filled
-        :param extruders: : vertex numpy array to be filled
-        :param line_types: : vertex numpy array to be filled
-        :param indices: : index numpy array to be filled
+        :param vertex_offset: determines where to start and end filling the arrays
+        :param index_offset: determines where to start and end filling the arrays
+        :param vertices: vertex numpy array to be filled
+        :param colors: vertex numpy array to be filled
+        :param line_dimensions: vertex numpy array to be filled
+        :param feedrates: vertex numpy array to be filled
+        :param extruders: vertex numpy array to be filled
+        :param line_types: vertex numpy array to be filled
+        :param indices: index numpy array to be filled
         """
 
         if self._build_cache_line_mesh_mask is None or self._build_cache_needed_points is None:

+ 1 - 1
cura/MachineAction.py

@@ -74,7 +74,7 @@ class MachineAction(QObject, PluginObject):
     def _reset(self) -> None:
         """Protected implementation of reset.
         
-        :py:meth:`cura.MachineAction.MachineAction.reset`
+        See also :py:meth:`cura.MachineAction.MachineAction.reset`
         """
 
         pass