8000 - pep8 lines to long · matplotlib/matplotlib@54b784a · GitHub
[go: up one dir, main page]

Skip to content

Commit 54b784a

Browse files
committed
- pep8 lines to long
1 parent 5c10f4e commit 54b784a

File tree

1 file changed

+27
-19
lines changed

1 file changed

+27
-19
lines changed

lib/matplotlib/backends/backend_wx.py

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ def debug_on_error(type, value, tb):
6464

6565
class fake_stderr:
6666

67-
"""Wx does strange things with stderr, as it makes the assumption that there
68-
is probably no console. This redirects stderr to the console, since we know
69-
that there is one!"""
67+
"""Wx does strange things with stderr, as it makes the assumption that
68+
there is probably no console. This redirects stderr to the console, since
69+
we know that there is one!"""
7070

7171
def write(self, msg):
7272
print("Stderr: %s\n\r" % msg)
@@ -86,7 +86,8 @@ def write(self, msg):
8686

8787
from matplotlib._pylab_helpers import Gcf
8888
from matplotlib.artist import Artist
89-
from matplotlib.cbook import exception_to_str, is_string_like, is_writable_file_like
89+
from matplotlib.cbook import exception_to_str, is_string_like, \
90+
is_writable_file_like
9091
from matplotlib.figure import Figure
9192
from matplotlib.path import Path
9293
from matplotlib.text import _process_text_args, Text
@@ -199,7 +200,8 @@ def __init__(self, bitmap, dpi):
199200
DEBUG_MSG("__init__()", 1, self)
200201
if wx.VERSION_STRING < "2.8":
201202
raise RuntimeError(
202-
"matplotlib no longer supports wxPython < 2.8 for the Wx backends.")
203+
"matplotlib no longer supports wxPython < 2.8 for"
204+
"the Wx backends.")
203205
self.width = bitmap.GetWidth()
204206
self.height = bitmap.GetHeight()
205207
self.bitmap = bitmap
@@ -275,8 +277,8 @@ def draw_path(self, gc, path, transform, rgbFace=None):
275277
gc.select()
276278
self.handle_clip_rectangle(gc)
277279
gfx_ctx = gc.gfx_ctx
278-
transform = transform + Affine2D().scale(1.0, -1.0).translate(0.0,
279-
self.height)
280+
transform = transform + \
281+
Affine2D().scale(1.0, -1.0).translate(0.0, self.height)
280282
wxpath = self.convert_path(gfx_ctx, path, transform)
281283
if rgbFace is not None:
282284
gfx_ctx.SetBrush(wx.Brush(gc.get_wxcolour(rgbFace)))
@@ -578,9 +580,9 @@ class FigureCanvasWx(FigureCanvasBase, wx.Panel):
578580
The FigureCanvas contains the figure and does event handling.
579581
580582
In the wxPython backend, it is derived from wxPanel, and (usually) lives
581-
inside a frame instantiated by a FigureManagerWx. The parent window probably
582-
implements a wx.Sizer to control the displayed control size - but we give a
583-
hint as to our preferred minimum size.
583+
inside a frame instantiated by a FigureManagerWx. The parent window
584+
probably implements a wx.Sizer to control the displayed control size - but
585+
we give a hint as to our preferred minimum size.
584586
"""
585587

586588
keyvald = {
@@ -663,7 +665,9 @@ def __init__(self, parent, id, figure):
663665

664666
def do_nothing(*args, **kwargs):
665667
warnings.warn(
666-
'could not find a setinitialsize function for backend_wx; please report your wxpython version=%s to the matplotlib developers list' %
668+
"could not find a setinitialsize function for backend_wx; "
669+
"please report your wxpython version=%s "
670+
"to the matplotlib developers list" %
667671
backend_version)
668672
pass
669673

@@ -776,9 +780,10 @@ def draw(self, drawDC=None):
776780

777781
def new_timer(self, *args, **kwargs):
778782
"""
779-
Creates a new backend-specific subclass of :class:`backend_bases.Timer`.
780-
This is useful for getting periodic events through the backend's native
781-
event loop. Implemented only for backends with GUIs.
783+
Creates a new backend-specific subclass of
784+
:class:`backend_bases.Timer`. This is useful for getting periodic
785+
events through the backend's native event loop. Implemented only
786+
for backends with GUIs.
782787
783788
optional arguments:
784789
@@ -939,9 +944,10 @@ def _print_image(self, filename, filetype, *args, **kwargs):
939944

940945
# image is the object that we call SaveFile on.
941946
image = self.bitmap
942-
# set the JPEG quality appropriately. Unfortunately, it is only possible
943-
# to set the quality on a wx.Image object. So if we are saving a JPEG,
944-
# convert the wx.Bitmap to a wx.Image, and set the quality.
947+
# set the JPEG quality appropriately. Unfortunately, it is only
948+
# possible to set the quality on a wx.Image object. So if we
949+
# are saving a JPEG, convert the wx.Bitmap to a wx.Image,
950+
# and set the quality.
945951
if filetype == wx.BITMAP_TYPE_JPEG:
946952
jpeg_quality = kwargs.get(
947953
'quality',
@@ -1708,7 +1714,8 @@ def save_figure(self, *args):
17081714
# looks like they forgot to set the image type drop
17091715
# down, going with the extension.
17101716
warnings.warn(
1711-
'extension %s did not match the selected image type %s; going with %s' %
1717+
'extension %s did not match the selected '
1718+
'image type %s; going with %s' %
17121719
(ext, format, ext), stacklevel=0)
17131720
format = ext
17141721
try:
@@ -1735,7 +1742,8 @@ def dynamic_update(self):
17351742
self._idle = True
17361743

17371744
def draw_rubberband(self, event, x0, y0, x1, y1):
1738-
'adapted from http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/189744'
1745+
"""adapted from
1746+
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/189744"""
17391747
canvas = self.canvas
17401748
dc = wx.ClientDC(canvas)
17411749

0 commit comments

Comments
 (0)
0