diff options
| author | Lex Neva <github.com@lexneva.name> | 2018-08-21 20:50:14 -0400 |
|---|---|---|
| committer | Lex Neva <github.com@lexneva.name> | 2018-08-21 20:50:14 -0400 |
| commit | 94f391ab4262b5e1c8dace0263467a0ec1f17058 (patch) | |
| tree | 8ce8836e5ac65e81b48d71615639bc0e7b9c08b9 /lib | |
| parent | 038875f876d79d0f1e971886fe42f5bee4f9f31e (diff) | |
more pep8 fixes
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/elements/fill.py | 3 | ||||
| -rw-r--r-- | lib/elements/satin_column.py | 5 | ||||
| -rw-r--r-- | lib/elements/stroke.py | 4 | ||||
| -rw-r--r-- | lib/extensions/install.py | 6 | ||||
| -rw-r--r-- | lib/extensions/print_pdf.py | 5 | ||||
| -rw-r--r-- | lib/stitch_plan/stitch_plan.py | 4 | ||||
| -rw-r--r-- | lib/stitches/fill.py | 2 |
7 files changed, 19 insertions, 10 deletions
diff --git a/lib/elements/fill.py b/lib/elements/fill.py index 672f4db8..77284414 100644 --- a/lib/elements/fill.py +++ b/lib/elements/fill.py @@ -44,7 +44,8 @@ class Fill(EmbroideryElement): @param( 'flip', _('Flip fill (start right-to-left)'), - tooltip=_('The flip option can help you with routing your stitch path. When you enable flip, stitching goes from right-to-left instead of left-to-right.'), + tooltip=_('The flip option can help you with routing your stitch path. ' + 'When you enable flip, stitching goes from right-to-left instead of left-to-right.'), type='boolean', default=False) def flip(self): diff --git a/lib/elements/satin_column.py b/lib/elements/satin_column.py index e13e1118..9927a606 100644 --- a/lib/elements/satin_column.py +++ b/lib/elements/satin_column.py @@ -42,7 +42,8 @@ class SatinColumn(EmbroideryElement): @param( 'pull_compensation_mm', _('Pull compensation'), - tooltip=_('Satin stitches pull the fabric together, resulting in a column narrower than you draw in Inkscape. This setting expands each pair of needle penetrations outward from the center of the satin column.'), + tooltip=_('Satin stitches pull the fabric together, resulting in a column narrower than you draw in Inkscape. ' + 'This setting expands each pair of needle penetrations outward from the center of the satin column.'), unit='mm', type='float', default=0) @@ -174,7 +175,7 @@ class SatinColumn(EmbroideryElement): # handle null intersections here? linestrings = shops.split(rail, rungs) - #print >> dbg, "rails and rungs", [str(rail) for rail in rails], [str(rung) for rung in rungs] + # print >> dbg, "rails and rungs", [str(rail) for rail in rails], [str(rung) for rung in rungs] if len(linestrings.geoms) < len(rungs.geoms) + 1: self.fatal(_("satin column: One or more of the rungs doesn't intersect both rails.") + " " + _("Each rail should intersect both rungs once.")) diff --git a/lib/elements/stroke.py b/lib/elements/stroke.py index 183ef23b..3ae2b143 100644 --- a/lib/elements/stroke.py +++ b/lib/elements/stroke.py @@ -41,7 +41,9 @@ class Stroke(EmbroideryElement): @param( 'bean_stitch_repeats', _('Bean stitch number of repeats'), - tooltip=_('Backtrack each stitch this many times. A value of 1 would triple each stitch (forward, back, forward). A value of 2 would quintuple each stitch, etc. Only applies to running stitch.'), + tooltip=_('Backtrack each stitch this many times. ' + 'A value of 1 would triple each stitch (forward, back, forward). ' + 'A value of 2 would quintuple each stitch, etc. Only applies to running stitch.'), type='int', default=0, sort_index=2) diff --git a/lib/extensions/install.py b/lib/extensions/install.py index 2863bef0..0745eddc 100644 --- a/lib/extensions/install.py +++ b/lib/extensions/install.py @@ -27,8 +27,10 @@ class InstallerFrame(wx.Frame): text_sizer = wx.BoxSizer(wx.HORIZONTAL) - text = _('Ink/Stitch can install files ("add-ons") that make it easier to use Inkscape to create machine embroidery designs. These add-ons will be installed:') + \ - "\n\n • " + _("thread manufacturer color palettes") + "\n • " + _("Ink/Stitch visual commands (Object -> Symbols...)") + text = (_('Ink/Stitch can install files ("add-ons") that make it easier to use Inkscape to create machine embroidery designs. ' + 'These add-ons will be installed:') + + "\n\n • " + _("thread manufacturer color palettes") + + "\n • " + _("Ink/Stitch visual commands (Object -> Symbols...)")) static_text = wx.StaticText(panel, label=text) font = wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.NORMAL) diff --git a/lib/extensions/print_pdf.py b/lib/extensions/print_pdf.py index ee3dc316..90ca83ae 100644 --- a/lib/extensions/print_pdf.py +++ b/lib/extensions/print_pdf.py @@ -262,7 +262,10 @@ class PrintInfoFrame(wx.Frame): panel = wx.Panel(self) sizer = wx.BoxSizer(wx.VERTICAL) - text = wx.StaticText(panel, label=_("A print preview has been opened in your web browser. This window will stay open in order to communicate with the JavaScript code running in your browser.\n\nThis window will close after you close the print preview in your browser, or you can close it manually if necessary.")) + message = _("A print preview has been opened in your web browser. " + "This window will stay open in order to communicate with the JavaScript code running in your browser.\n\n" + "This window will close after you close the print preview in your browser, or you can close it manually if necessary.") + text = wx.StaticText(panel, label=message) font = wx.Font(14, wx.DEFAULT, wx.NORMAL, wx.NORMAL) text.SetFont(font) sizer.Add(text, proportion=1, flag=wx.ALL | wx.EXPAND, border=20) diff --git a/lib/stitch_plan/stitch_plan.py b/lib/stitch_plan/stitch_plan.py index 682ea09f..c713b42e 100644 --- a/lib/stitch_plan/stitch_plan.py +++ b/lib/stitch_plan/stitch_plan.py @@ -209,8 +209,8 @@ class ColorBlock(object): # Don't consider jumps, stops, color changes, or trims as candidates for filtering pass else: - l = (stitch - stitches[-1]).length() - if l <= 0.1 * PIXELS_PER_MM: + length = (stitch - stitches[-1]).length() + if length <= 0.1 * PIXELS_PER_MM: # duplicate stitch, skip this one continue diff --git a/lib/stitches/fill.py b/lib/stitches/fill.py index ac8b52ee..b6b97e1b 100644 --- a/lib/stitches/fill.py +++ b/lib/stitches/fill.py @@ -120,7 +120,7 @@ def intersect_region_with_grating(shape, angle, row_spacing, end_row_spacing=Non height = abs(end - start) - #print >> dbg, "grating:", start, end, height, row_spacing, end_row_spacing + # print >> dbg, "grating:", start, end, height, row_spacing, end_row_spacing # offset start slightly so that rows are always an even multiple of # row_spacing_px from the origin. This makes it so that abutting |
