Skip to content

Commit

Permalink
Merge pull request #10134 from anntzer/cleanup
Browse files Browse the repository at this point in the history
Minor style cleanups.
  • Loading branch information
QuLogic committed Dec 30, 2017
2 parents 884060a + af78bbd commit 7f728fe
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
8 changes: 3 additions & 5 deletions lib/matplotlib/backends/backend_gtk3cairo.py
Expand Up @@ -25,23 +25,21 @@ class FigureCanvasGTK3Cairo(backend_gtk3.FigureCanvasGTK3,
backend_cairo.FigureCanvasCairo):

def _renderer_init(self):
"""use cairo renderer"""
"""Use cairo renderer."""
self._renderer = RendererGTK3Cairo(self.figure.dpi)

def _render_figure(self, width, height):
self._renderer.set_width_height(width, height)
self.figure.draw(self._renderer)

def on_draw_event(self, widget, ctx):
""" GtkDrawable draw event, like expose_event in GTK 2.X
"""
"""GtkDrawable draw event."""
toolbar = self.toolbar
if toolbar:
toolbar.set_cursor(cursors.WAIT)
self._renderer.set_context(ctx)
allocation = self.get_allocation()
x, y, w, h = allocation.x, allocation.y, allocation.width, allocation.height
self._render_figure(w, h)
self._render_figure(allocation.width, allocation.height)
if toolbar:
toolbar.set_cursor(toolbar._lastCursor)
return False # finish event propagation?
Expand Down
3 changes: 1 addition & 2 deletions lib/matplotlib/transforms.py
Expand Up @@ -1119,8 +1119,7 @@ def __init__(self, bbox, x0=None, y0=None, x1=None, y1=None, **kwargs):
self._points = None
fp = [x0, y0, x1, y1]
mask = [val is None for val in fp]
self._locked_points = np.ma.array(fp, np.float_,
mask=mask).reshape((2, 2))
self._locked_points = np.ma.array(fp, float, mask=mask).reshape((2, 2))

def __str__(self):
return ("{}(\n"
Expand Down
1 change: 0 additions & 1 deletion pytest.ini
Expand Up @@ -28,7 +28,6 @@ pep8ignore =
matplotlib/backends/backend_gdk.py E202 E203 E211 E221 E225 E231 E261 E302 E303 E402 E501 E702 E711
matplotlib/backends/backend_gtk.py E201 E202 E203 E211 E221 E222 E225 E231 E251 E261 E262 E301 E302 E303 E401 E402 E501 E701 E702 E703
matplotlib/backends/backend_gtk3.py E201 E202 E203 E211 E221 E222 E225 E231 E251 E261 E262 E301 E302 E401 E402 E501 E701
matplotlib/backends/backend_gtk3cairo.py E211 E302 E501
matplotlib/backends/backend_gtkagg.py E211 E225 E231 E261 E302 E501 E701
matplotlib/backends/backend_gtkcairo.py E211 E225 E231 E402 E701
matplotlib/backends/backend_macosx.py E222 E225 E231 E261 E501 E701 E711
Expand Down

0 comments on commit 7f728fe

Please sign in to comment.