Skip to content

Commit f4e9c6c

Browse files
committed
class foo: => class foo(object):
1 parent dbeed94 commit f4e9c6c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+80
-80
lines changed

examples/animation/strip_chart_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import matplotlib.animation as animation
99

1010

11-
class Scope:
11+
class Scope(object)
1212
def __init__(self, ax, maxt=2, dt=0.02):
1313
self.ax = ax
1414
self.dt = dt

examples/event_handling/data_browser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import numpy as np
22

33

4-
class PointBrowser:
4+
class PointBrowser(object):
55
"""
66
Click on a point to select and highlight it -- the data that
77
generated the point will be shown in the lower axes. Use the 'n'

examples/event_handling/looking_glass.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
line, = ax.plot(x, y, alpha=1.0, clip_path=circ)
1313

1414

15-
class EventHandler:
15+
class EventHandler(object):
1616
def __init__(self):
1717
fig.canvas.mpl_connect('button_press_event', self.onpress)
1818
fig.canvas.mpl_connect('button_release_event', self.onrelease)

examples/event_handling/path_editor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
ax.add_patch(patch)
2626

2727

28-
class PathInteractor:
28+
class PathInteractor(object):
2929
"""
3030
An path editor.
3131

examples/event_handling/poly_editor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from matplotlib.mlab import dist_point_to_segment
1010

1111

12-
class PolygonInteractor:
12+
class PolygonInteractor(object):
1313
"""
1414
An polygon editor.
1515

examples/pylab_examples/cursor_demo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from pylab import *
1515

1616

17-
class Cursor:
17+
class Cursor(object):
1818
def __init__(self, ax):
1919
self.ax = ax
2020
self.lx = ax.axhline(color='k') # the horiz line
@@ -35,7 +35,7 @@ def mouse_move(self, event):
3535
draw()
3636

3737

38-
class SnaptoCursor:
38+
class SnaptoCursor(object):
3939
"""
4040
Like Cursor but the crosshair snaps to the nearest x,y point
4141
For simplicity, I'm assuming x is sorted

examples/pylab_examples/image_slices_viewer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from matplotlib.pyplot import figure, show
44

55

6-
class IndexTracker:
6+
class IndexTracker(object):
77
def __init__(self, ax, X):
88
self.ax = ax
99
ax.set_title('use scroll wheel to navigate images')

examples/pylab_examples/multi_image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
# observing it for changes in cmap or norm.
5353

5454

55-
class ImageFollower:
55+
class ImageFollower(object):
5656
'update image in response to changes in clim or cmap on another image'
5757

5858
def __init__(self, follower):

examples/units/evans_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import matplotlib.pyplot as plt
1111

1212

13-
class Foo:
13+
class Foo(object):
1414
def __init__(self, val, unit=1.0):
1515
self.unit = unit
1616
self._val = val * unit
@@ -20,7 +20,7 @@ def value(self, unit):
2020
return self._val / unit
2121

2222

23-
class FooConverter:
23+
class FooConverter(object):
2424
@staticmethod
2525
def axisinfo(unit, axis):
2626
'return the Foo AxisInfo'

examples/user_interfaces/fourier_demo_wx.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from matplotlib.pyplot import gcf, setp
1010

1111

12-
class Knob:
12+
class Knob(object):
1313
"""
1414
Knob - simple class with a "setKnob" method.
1515
A Knob instance is attached to a Param instance, e.g., param.attach(knob)
@@ -20,7 +20,7 @@ def setKnob(self, value):
2020
pass
2121

2222

23-
class Param:
23+
class Param(object):
2424
"""
2525
The idea of the "Param" class is that some parameter in the GUI may have
2626
several knobs that both control it and reflect the parameter's state, e.g.

0 commit comments

Comments
 (0)