summaryrefslogtreecommitdiff
path: root/lib/elements/element.py
diff options
context:
space:
mode:
authorAndreas <v.andreas.1@web.de>2021-10-29 16:18:22 +0200
committerKaalleen <reni@allenka.de>2022-05-04 18:57:12 +0200
commit125db3f83b3b330df757f7cc0faf6489b3cb348d (patch)
tree2ec854975fffd48129d171b2e1f57ff97df9995b /lib/elements/element.py
parent0fcf8bb97ced8df552cd0283b4ea009b6ca42623 (diff)
Applied style guide
Diffstat (limited to 'lib/elements/element.py')
-rw-r--r--lib/elements/element.py22
1 files changed, 14 insertions, 8 deletions
diff --git a/lib/elements/element.py b/lib/elements/element.py
index b8728f60..ef70510d 100644
--- a/lib/elements/element.py
+++ b/lib/elements/element.py
@@ -33,7 +33,6 @@ class Param(object):
self.tooltip = tooltip
self.sort_index = sort_index
self.select_items = select_items
- #print("IN PARAM: ", self.values)
def __repr__(self):
return "Param(%s)" % vars(self)
@@ -164,7 +163,8 @@ class EmbroideryElement(object):
# Of course, transforms may also involve rotation, skewing, and translation.
# All except translation can affect how wide the stroke appears on the screen.
- node_transform = inkex.transforms.Transform(get_node_transform(self.node))
+ node_transform = inkex.transforms.Transform(
+ get_node_transform(self.node))
# First, figure out the translation component of the transform. Using a zero
# vector completely cancels out the rotation, scale, and skew components.
@@ -198,7 +198,8 @@ class EmbroideryElement(object):
@property
@param('ties',
_('Allow lock stitches'),
- tooltip=_('Tie thread at the beginning and/or end of this object. Manual stitch will not add lock stitches.'),
+ tooltip=_(
+ 'Tie thread at the beginning and/or end of this object. Manual stitch will not add lock stitches.'),
type='dropdown',
# Ties: 0 = Both | 1 = Before | 2 = After | 3 = Neither
# L10N options to allow lock stitch before and after objects
@@ -256,7 +257,8 @@ class EmbroideryElement(object):
d = self.node.get("d", "")
if not d:
- self.fatal(_("Object %(id)s has an empty 'd' attribute. Please delete this object from your document.") % dict(id=self.node.get("id")))
+ self.fatal(_("Object %(id)s has an empty 'd' attribute. Please delete this object from your document.") % dict(
+ id=self.node.get("id")))
return inkex.paths.Path(d).to_superpath()
@@ -266,7 +268,8 @@ class EmbroideryElement(object):
@property
def shape(self):
- raise NotImplementedError("INTERNAL ERROR: %s must implement shape()", self.__class__)
+ raise NotImplementedError(
+ "INTERNAL ERROR: %s must implement shape()", self.__class__)
@property
@cache
@@ -316,7 +319,8 @@ class EmbroideryElement(object):
return self.get_boolean_param('stop_after', False)
def to_stitch_groups(self, last_patch):
- raise NotImplementedError("%s must implement to_stitch_groups()" % self.__class__.__name__)
+ raise NotImplementedError(
+ "%s must implement to_stitch_groups()" % self.__class__.__name__)
def embroider(self, last_patch):
self.validate()
@@ -329,8 +333,10 @@ class EmbroideryElement(object):
patch.force_lock_stitches = self.force_lock_stitches
if patches:
- patches[-1].trim_after = self.has_command("trim") or self.trim_after
- patches[-1].stop_after = self.has_command("stop") or self.stop_after
+ patches[-1].trim_after = self.has_command(
+ "trim") or self.trim_after
+ patches[-1].stop_after = self.has_command(
+ "stop") or self.stop_after
return patches