Applied requested changes proposed by @ninovanhooff

Fixed a couple of missed double quotes, trailing and leading spaces, to long comment lines
This commit is contained in:
Jelle Spijker 2020-04-27 20:09:00 +02:00 committed by Jelle Spijker
parent 9b44ca37ef
commit 679739d09d
No known key found for this signature in database
GPG key ID: 6662DC033BE6B99A
9 changed files with 27 additions and 28 deletions

View file

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

View file

@ -20,7 +20,7 @@ class Backups:
from cura.API import CuraAPI from cura.API import CuraAPI
api = CuraAPI() api = CuraAPI()
api.backups.createBackup() 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: def __init__(self, application: "CuraApplication") -> None:

View file

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

View file

@ -99,7 +99,7 @@ class Arrange:
self._last_priority = 0 self._last_priority = 0
def findNodePlacement(self, node: SceneNode, offset_shape_arr: ShapeArray, hull_shape_arr: ShapeArray, step = 1) -> bool: 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 node: The node to be placed
:param offset_shape_arr: shape array with offset, for placing the shape :param offset_shape_arr: shape array with offset, for placing the shape
@ -134,7 +134,7 @@ class Arrange:
return found_spot return found_spot
def centerFirst(self): 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 # Square distance: creates a more round shape
self._priority = numpy.fromfunction( self._priority = numpy.fromfunction(
@ -143,7 +143,7 @@ class Arrange:
self._priority_unique_values.sort() self._priority_unique_values.sort()
def backFirst(self): 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( self._priority = numpy.fromfunction(
lambda j, i: 10 * j + abs(self._offset_x - i), self._shape, dtype=numpy.int32) 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() self._priority_unique_values.sort()
def checkShape(self, x, y, shape_arr) -> Optional[numpy.ndarray]: 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 x: x-coordinate to check shape
:param y: y-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)]) return numpy.sum(prio_slice[numpy.where(shape_arr.arr == 1)])
def bestSpot(self, shape_arr, start_prio = 0, step = 1) -> LocationSuggestion: 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 shape_arr: shape array
:param start_prio: Start with this priority value (and skip the ones before) :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 :-( 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): 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 Marks the locations in self._occupied and self._priority

View file

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

View file

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

View file

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

View file

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

View file

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