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

Skip to content

Commit e39b334

Browse files
authored
Merge pull request #14328 from timhoffm/no-inherit-object
Remove explicit inheritance from object
2 parents 6f1ffeb + aeb46ca commit e39b334

79 files changed

Lines changed: 176 additions & 176 deletions

Some content is hidden

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

lib/matplotlib/_layoutbox.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def get_renderer(fig):
4343
return renderer
4444

4545

46-
class LayoutBox(object):
46+
class LayoutBox:
4747
"""
4848
Basic rectangle representation using kiwi solver variables
4949
"""

lib/matplotlib/_pylab_helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import gc
77

88

9-
class Gcf(object):
9+
class Gcf:
1010
"""
1111
Singleton to manage a set of integer-numbered figures.
1212

lib/matplotlib/afm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ def _parse_afm(fh):
393393
return header, cmetrics_by_ascii, cmetrics_by_name, kernpairs, composites
394394

395395

396-
class AFM(object):
396+
class AFM:
397397

398398
def __init__(self, fh):
399399
"""Parse the AFM file in file object *fh*."""

lib/matplotlib/animation.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def correct_roundoff(x, dpi, n):
9393

9494

9595
# A registry for available MovieWriter classes
96-
class MovieWriterRegistry(object):
96+
class MovieWriterRegistry:
9797
'''Registry of available writer classes by human readable name.'''
9898
def __init__(self):
9999
self.avail = dict()
@@ -576,7 +576,7 @@ def finish(self):
576576

577577
# Base class of ffmpeg information. Has the config keys and the common set
578578
# of arguments that controls the *output* side of things.
579-
class FFMpegBase(object):
579+
class FFMpegBase:
580580
'''Mixin class for FFMpeg output.
581581
582582
To be useful this must be multiply-inherited from with a
@@ -696,7 +696,7 @@ class AVConvFileWriter(AVConvBase, FFMpegFileWriter):
696696

697697

698698
# Base class for animated GIFs with ImageMagick
699-
class ImageMagickBase(object):
699+
class ImageMagickBase:
700700
'''Mixin class for ImageMagick output.
701701
702702
To be useful this must be multiply-inherited from with a
@@ -880,7 +880,7 @@ def finish(self):
880880
**mode_dict))
881881

882882

883-
class Animation(object):
883+
class Animation:
884884
'''This class wraps the creation of an animation using matplotlib.
885885
886886
It is only a base class which should be subclassed to provide

lib/matplotlib/artist.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def _stale_axes_callback(self, val):
5454
_XYPair = namedtuple("_XYPair", "x y")
5555

5656

57-
class Artist(object):
57+
class Artist:
5858
"""
5959
Abstract base class for objects that render into a FigureCanvas.
6060
@@ -1168,7 +1168,7 @@ def mouseover(self, val):
11681168
ax._mouseover_set.discard(self)
11691169

11701170

1171-
class ArtistInspector(object):
1171+
class ArtistInspector:
11721172
"""
11731173
A helper class to inspect an `~matplotlib.artist.Artist` and return
11741174
information about its settable properties and their current values.

lib/matplotlib/axes/_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def _process_plot_format(fmt):
114114
return linestyle, marker, color
115115

116116

117-
class _process_plot_var_args(object):
117+
class _process_plot_var_args:
118118
"""
119119
Process variable length arguments to the plot command, so that
120120
plot commands like the following are supported::

lib/matplotlib/axes/_subplots.py

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

1010

11-
class SubplotBase(object):
11+
class SubplotBase:
1212
"""
1313
Base class for subplots, which are :class:`Axes` instances with
1414
additional methods to facilitate generating and manipulating a set

lib/matplotlib/axis.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ def get_view_interval(self):
628628
return self.axes.viewLim.intervaly
629629

630630

631-
class Ticker(object):
631+
class Ticker:
632632
"""
633633
A container for the objects defining tick position and format.
634634
@@ -671,7 +671,7 @@ def formatter(self, formatter):
671671
self._formatter = formatter
672672

673673

674-
class _LazyTickList(object):
674+
class _LazyTickList:
675675
"""
676676
A descriptor for lazy instantiation of tick lists.
677677

lib/matplotlib/backend_bases.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def get_registered_canvas_class(format):
127127
return backend_class
128128

129129

130-
class RendererBase(object):
130+
class RendererBase:
131131
"""An abstract base class to handle drawing/rendering operations.
132132
133133
The following methods must be implemented in the backend for full
@@ -712,7 +712,7 @@ def stop_filter(self, filter_func):
712712
"""
713713

714714

715-
class GraphicsContextBase(object):
715+
class GraphicsContextBase:
716716
"""An abstract base class that provides color, line styles, etc."""
717717

718718
def __init__(self):
@@ -1032,7 +1032,7 @@ def set_sketch_params(self, scale=None, length=None, randomness=None):
10321032
else (scale, length or 128., randomness or 16.))
10331033

10341034

1035-
class TimerBase(object):
1035+
class TimerBase:
10361036
"""
10371037
A base class for providing timer events, useful for things animations.
10381038
Backends need to implement a few specific methods in order to use their
@@ -1203,7 +1203,7 @@ def _on_timer(self):
12031203
self.stop()
12041204

12051205

1206-
class Event(object):
1206+
class Event:
12071207
"""
12081208
A matplotlib event. Attach additional attributes as defined in
12091209
:meth:`FigureCanvasBase.mpl_connect`. The following attributes
@@ -1552,7 +1552,7 @@ def _draw(renderer): raise Done(renderer)
15521552
return figure._cachedRenderer
15531553

15541554

1555-
class FigureCanvasBase(object):
1555+
class FigureCanvasBase:
15561556
"""
15571557
The canvas the figure renders into.
15581558
@@ -2466,7 +2466,7 @@ class NonGuiException(Exception):
24662466
pass
24672467

24682468

2469-
class FigureManagerBase(object):
2469+
class FigureManagerBase:
24702470
"""
24712471
Helper class for pyplot mode, wraps everything up into a neat bundle
24722472
@@ -2567,7 +2567,7 @@ def set_window_title(self, title):
25672567
cursors = tools.cursors
25682568

25692569

2570-
class NavigationToolbar2(object):
2570+
class NavigationToolbar2:
25712571
"""
25722572
Base class for the navigation cursor, version 2
25732573
@@ -3079,7 +3079,7 @@ def set_history_buttons(self):
30793079
"""Enable or disable the back/forward button."""
30803080

30813081

3082-
class ToolContainerBase(object):
3082+
class ToolContainerBase:
30833083
"""
30843084
Base class for all tool containers, e.g. toolbars.
30853085
@@ -3223,7 +3223,7 @@ def remove_toolitem(self, name):
32233223
raise NotImplementedError
32243224

32253225

3226-
class StatusbarBase(object):
3226+
class StatusbarBase:
32273227
"""Base class for the statusbar"""
32283228
def __init__(self, toolmanager):
32293229
self.toolmanager = toolmanager
@@ -3246,7 +3246,7 @@ def set_message(self, s):
32463246
pass
32473247

32483248

3249-
class _Backend(object):
3249+
class _Backend:
32503250
# A backend can be defined by using the following pattern:
32513251
#
32523252
# @_Backend.export

lib/matplotlib/backend_managers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
_log = logging.getLogger(__name__)
99

1010

11-
class ToolEvent(object):
11+
class ToolEvent:
1212
"""Event for tool manipulation (add/remove)."""
1313
def __init__(self, name, sender, tool, data=None):
1414
self.name = name
@@ -24,7 +24,7 @@ def __init__(self, name, sender, tool, canvasevent=None, data=None):
2424
self.canvasevent = canvasevent
2525

2626

27-
class ToolManagerMessageEvent(object):
27+
class ToolManagerMessageEvent:
2828
"""
2929
Event carrying messages from toolmanager.
3030
@@ -36,7 +36,7 @@ def __init__(self, name, sender, message):
3636
self.message = message
3737

3838

39-
class ToolManager(object):
39+
class ToolManager:
4040
"""
4141
Manager for actions triggered by user interactions (key press, toolbar
4242
clicks, ...) on a Figure.

0 commit comments

Comments
 (0)