diff options
| author | Lex Neva <github.com@lexneva.name> | 2018-08-21 20:32:50 -0400 |
|---|---|---|
| committer | Lex Neva <github.com@lexneva.name> | 2018-08-21 20:32:50 -0400 |
| commit | 038875f876d79d0f1e971886fe42f5bee4f9f31e (patch) | |
| tree | 296c60d3b490f988802f9bec884eed32dcbf9c0c /lib/extensions/object_commands.py | |
| parent | f26042f477f1520443b1d9dad0bb88ef3ad7ca47 (diff) | |
autopep8
Diffstat (limited to 'lib/extensions/object_commands.py')
| -rw-r--r-- | lib/extensions/object_commands.py | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/lib/extensions/object_commands.py b/lib/extensions/object_commands.py index e9ee6063..483f2a0a 100644 --- a/lib/extensions/object_commands.py +++ b/lib/extensions/object_commands.py @@ -24,18 +24,18 @@ class ObjectCommands(CommandsExtension): end_pos = element.shape.centroid path = inkex.etree.Element(SVG_PATH_TAG, - { - "id": self.uniqueId("connector"), - "d": "M %s,%s %s,%s" % (start_pos[0], start_pos[1], end_pos.x, end_pos.y), - "style": "stroke:#000000;stroke-width:1px;stroke-opacity:0.5;fill:none;", - CONNECTION_START: "#%s" % symbol.get('id'), - CONNECTION_END: "#%s" % element.node.get('id'), - CONNECTOR_TYPE: "polyline", - - # l10n: the name of the line that connects a command to the object it applies to - INKSCAPE_LABEL: _("connector") - } - ) + { + "id": self.uniqueId("connector"), + "d": "M %s,%s %s,%s" % (start_pos[0], start_pos[1], end_pos.x, end_pos.y), + "style": "stroke:#000000;stroke-width:1px;stroke-opacity:0.5;fill:none;", + CONNECTION_START: "#%s" % symbol.get('id'), + CONNECTION_END: "#%s" % element.node.get('id'), + CONNECTOR_TYPE: "polyline", + + # l10n: the name of the line that connects a command to the object it applies to + INKSCAPE_LABEL: _("connector") + } + ) symbol.getparent().insert(0, path) @@ -75,26 +75,26 @@ class ObjectCommands(CommandsExtension): pos = self.get_command_pos(element, i, len(commands)) group = inkex.etree.SubElement(element.node.getparent(), SVG_GROUP_TAG, - { - "id": self.uniqueId("group"), - INKSCAPE_LABEL: _("Ink/Stitch Command") + ": %s" % get_command_description(command), - "transform": get_correction_transform(element.node) - } + { + "id": self.uniqueId("group"), + INKSCAPE_LABEL: _("Ink/Stitch Command") + ": %s" % get_command_description(command), + "transform": get_correction_transform(element.node) + } ) symbol = inkex.etree.SubElement(group, SVG_USE_TAG, - { - "id": self.uniqueId("use"), - XLINK_HREF: "#inkstitch_%s" % command, - "height": "100%", - "width": "100%", - "x": str(pos.x), - "y": str(pos.y), - - # l10n: the name of a command symbol (example: scissors icon for trim command) - INKSCAPE_LABEL: _("command marker"), - } - ) + { + "id": self.uniqueId("use"), + XLINK_HREF: "#inkstitch_%s" % command, + "height": "100%", + "width": "100%", + "x": str(pos.x), + "y": str(pos.y), + + # l10n: the name of a command symbol (example: scissors icon for trim command) + INKSCAPE_LABEL: _("command marker"), + } + ) self.add_connector(symbol, element) |
