Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 50d8690

Browse files
committed
Remove explicit inheritance from object
1 parent f67d556 commit 50d8690

41 files changed

Lines changed: 64 additions & 64 deletions

Some content is hidden

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

doc/sphinxext/gallery_order.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def __call__(self, item):
6464
explicit_subsection_order = [item + ".py" for item in list_all]
6565

6666

67-
class MplExplicitSubOrder(object):
67+
class MplExplicitSubOrder:
6868
"""For use within the 'within_subsection_order' key."""
6969
def __init__(self, src_dir):
7070
self.src_dir = src_dir # src_dir is unused here

examples/animation/bayes_update.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def beta_pdf(x, a, b):
2121
/ (math.gamma(a) * math.gamma(b)))
2222

2323

24-
class UpdateDist(object):
24+
class UpdateDist:
2525
def __init__(self, ax, prob=0.5):
2626
self.success = 0
2727
self.prob = prob

examples/animation/strip_chart.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import matplotlib.animation as animation
1313

1414

15-
class Scope(object):
15+
class Scope:
1616
def __init__(self, ax, maxt=2, dt=0.02):
1717
self.ax = ax
1818
self.dt = dt

examples/event_handling/data_browser.py

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

1414

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

examples/event_handling/image_slices_viewer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import matplotlib.pyplot as plt
1111

1212

13-
class IndexTracker(object):
13+
class IndexTracker:
1414
def __init__(self, ax, X):
1515
self.ax = ax
1616
ax.set_title('use scroll wheel to navigate images')

examples/event_handling/lasso_demo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import numpy as np
1919

2020

21-
class Datum(object):
21+
class Datum:
2222
colorin = mcolors.to_rgba("red")
2323
colorout = mcolors.to_rgba("blue")
2424

@@ -31,7 +31,7 @@ def __init__(self, x, y, include=False):
3131
self.color = self.colorout
3232

3333

34-
class LassoManager(object):
34+
class LassoManager:
3535
def __init__(self, ax, data):
3636
self.axes = ax
3737
self.canvas = ax.figure.canvas

examples/event_handling/looking_glass.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
ax.set_title("Left click and drag to move looking glass")
2525

2626

27-
class EventHandler(object):
27+
class EventHandler:
2828
def __init__(self):
2929
fig.canvas.mpl_connect('button_press_event', self.onpress)
3030
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
@@ -35,7 +35,7 @@
3535
ax.add_patch(patch)
3636

3737

38-
class PathInteractor(object):
38+
class PathInteractor:
3939
"""
4040
An path editor.
4141

examples/event_handling/pipong.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"""
3535

3636

37-
class Pad(object):
37+
class Pad:
3838
def __init__(self, disp, x, y, type='l'):
3939
self.disp = disp
4040
self.x = x
@@ -57,7 +57,7 @@ def contains(self, loc):
5757
return self.disp.get_bbox().contains(loc.x, loc.y)
5858

5959

60-
class Puck(object):
60+
class Puck:
6161
def __init__(self, disp, pad, field):
6262
self.vmax = .2
6363
self.disp = disp
@@ -120,7 +120,7 @@ def _speedlimit(self):
120120
self.vy = -self.vmax
121121

122122

123-
class Game(object):
123+
class Game:
124124
def __init__(self, ax):
125125
# create the initial line
126126
self.ax = ax

examples/event_handling/poly_editor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def dist_point_to_segment(p, s0, s1):
3939
return dist(p, pb)
4040

4141

42-
class PolygonInteractor(object):
42+
class PolygonInteractor:
4343
"""
4444
A polygon editor.
4545

0 commit comments

Comments
 (0)