From f4e9c6cf04322e3cf5e90d824c2b66dd2b73c298 Mon Sep 17 00:00:00 2001 From: switham Date: Fri, 17 Oct 2014 13:54:40 -0400 Subject: [PATCH] class foo: => class foo(object): --- examples/animation/strip_chart_demo.py | 2 +- examples/event_handling/data_browser.py | 2 +- examples/event_handling/looking_glass.py | 2 +- examples/event_handling/path_editor.py | 2 +- examples/event_handling/poly_editor.py | 2 +- examples/pylab_examples/cursor_demo.py | 4 ++-- examples/pylab_examples/image_slices_viewer.py | 2 +- examples/pylab_examples/multi_image.py | 2 +- examples/units/evans_test.py | 4 ++-- examples/user_interfaces/fourier_demo_wx.py | 4 ++-- examples/user_interfaces/interactive2.py | 4 ++-- examples/user_interfaces/mpl_with_glade.py | 4 ++-- examples/user_interfaces/mpl_with_glade_316.py | 2 +- examples/widgets/buttons.py | 2 +- examples/widgets/menu.py | 4 ++-- lib/matplotlib/__init__.py | 2 +- lib/matplotlib/animation.py | 6 +++--- lib/matplotlib/artist.py | 2 +- lib/matplotlib/axis.py | 2 +- lib/matplotlib/backend_bases.py | 6 +++--- lib/matplotlib/backends/backend_gtk.py | 2 +- lib/matplotlib/backends/backend_gtk3.py | 2 +- lib/matplotlib/backends/backend_pgf.py | 8 ++++---- lib/matplotlib/backends/backend_svg.py | 2 +- lib/matplotlib/backends/backend_tkagg.py | 2 +- lib/matplotlib/backends/backend_wx.py | 2 +- lib/matplotlib/backends/windowing.py | 2 +- lib/matplotlib/cbook.py | 14 +++++++------- lib/matplotlib/cm.py | 2 +- lib/matplotlib/contour.py | 2 +- lib/matplotlib/dates.py | 4 ++-- lib/matplotlib/figure.py | 2 +- lib/matplotlib/fontconfig_pattern.py | 2 +- lib/matplotlib/hatch.py | 2 +- lib/matplotlib/lines.py | 2 +- lib/matplotlib/mlab.py | 6 +++--- lib/matplotlib/rcsetup.py | 8 ++++---- lib/matplotlib/sankey.py | 2 +- lib/matplotlib/testing/jpl_units/Duration.py | 2 +- lib/matplotlib/testing/jpl_units/Epoch.py | 2 +- lib/matplotlib/testing/jpl_units/UnitDbl.py | 2 +- lib/matplotlib/tests/test_cbook.py | 4 ++-- lib/matplotlib/texmanager.py | 2 +- lib/matplotlib/ticker.py | 2 +- lib/matplotlib/tri/triinterpolate.py | 2 +- lib/matplotlib/units.py | 4 ++-- lib/matplotlib/widgets.py | 2 +- lib/mpl_toolkits/axes_grid1/axes_divider.py | 2 +- lib/mpl_toolkits/axes_grid1/parasite_axes.py | 6 +++--- lib/mpl_toolkits/axisartist/axisline_style.py | 2 +- lib/mpl_toolkits/axisartist/axislines.py | 2 +- 51 files changed, 80 insertions(+), 80 deletions(-) diff --git a/examples/animation/strip_chart_demo.py b/examples/animation/strip_chart_demo.py index 6766d7e4b41a..a3ee7ce7efad 100644 --- a/examples/animation/strip_chart_demo.py +++ b/examples/animation/strip_chart_demo.py @@ -8,7 +8,7 @@ import matplotlib.animation as animation -class Scope: +class Scope(object) def __init__(self, ax, maxt=2, dt=0.02): self.ax = ax self.dt = dt diff --git a/examples/event_handling/data_browser.py b/examples/event_handling/data_browser.py index 6e6aac117d3a..95614f9ffce5 100644 --- a/examples/event_handling/data_browser.py +++ b/examples/event_handling/data_browser.py @@ -1,7 +1,7 @@ import numpy as np -class PointBrowser: +class PointBrowser(object): """ Click on a point to select and highlight it -- the data that generated the point will be shown in the lower axes. Use the 'n' diff --git a/examples/event_handling/looking_glass.py b/examples/event_handling/looking_glass.py index c02738c130fb..a707bc13d364 100644 --- a/examples/event_handling/looking_glass.py +++ b/examples/event_handling/looking_glass.py @@ -12,7 +12,7 @@ line, = ax.plot(x, y, alpha=1.0, clip_path=circ) -class EventHandler: +class EventHandler(object): def __init__(self): fig.canvas.mpl_connect('button_press_event', self.onpress) fig.canvas.mpl_connect('button_release_event', self.onrelease) diff --git a/examples/event_handling/path_editor.py b/examples/event_handling/path_editor.py index dfe6e52b86a0..2ad6d9de6fb2 100644 --- a/examples/event_handling/path_editor.py +++ b/examples/event_handling/path_editor.py @@ -25,7 +25,7 @@ ax.add_patch(patch) -class PathInteractor: +class PathInteractor(object): """ An path editor. diff --git a/examples/event_handling/poly_editor.py b/examples/event_handling/poly_editor.py index 6f4c9c447b5d..47c173574bda 100644 --- a/examples/event_handling/poly_editor.py +++ b/examples/event_handling/poly_editor.py @@ -9,7 +9,7 @@ from matplotlib.mlab import dist_point_to_segment -class PolygonInteractor: +class PolygonInteractor(object): """ An polygon editor. diff --git a/examples/pylab_examples/cursor_demo.py b/examples/pylab_examples/cursor_demo.py index df8c239d0c36..46f553bcb98d 100755 --- a/examples/pylab_examples/cursor_demo.py +++ b/examples/pylab_examples/cursor_demo.py @@ -14,7 +14,7 @@ from pylab import * -class Cursor: +class Cursor(object): def __init__(self, ax): self.ax = ax self.lx = ax.axhline(color='k') # the horiz line @@ -35,7 +35,7 @@ def mouse_move(self, event): draw() -class SnaptoCursor: +class SnaptoCursor(object): """ Like Cursor but the crosshair snaps to the nearest x,y point For simplicity, I'm assuming x is sorted diff --git a/examples/pylab_examples/image_slices_viewer.py b/examples/pylab_examples/image_slices_viewer.py index 73b1c9be7bd1..e1cc48a1ffef 100644 --- a/examples/pylab_examples/image_slices_viewer.py +++ b/examples/pylab_examples/image_slices_viewer.py @@ -3,7 +3,7 @@ from matplotlib.pyplot import figure, show -class IndexTracker: +class IndexTracker(object): def __init__(self, ax, X): self.ax = ax ax.set_title('use scroll wheel to navigate images') diff --git a/examples/pylab_examples/multi_image.py b/examples/pylab_examples/multi_image.py index 3388c29d735b..2d607e147671 100644 --- a/examples/pylab_examples/multi_image.py +++ b/examples/pylab_examples/multi_image.py @@ -52,7 +52,7 @@ # observing it for changes in cmap or norm. -class ImageFollower: +class ImageFollower(object): 'update image in response to changes in clim or cmap on another image' def __init__(self, follower): diff --git a/examples/units/evans_test.py b/examples/units/evans_test.py index 22acd55c9430..f3fd02ca1dbf 100644 --- a/examples/units/evans_test.py +++ b/examples/units/evans_test.py @@ -10,7 +10,7 @@ import matplotlib.pyplot as plt -class Foo: +class Foo(object): def __init__(self, val, unit=1.0): self.unit = unit self._val = val * unit @@ -20,7 +20,7 @@ def value(self, unit): return self._val / unit -class FooConverter: +class FooConverter(object): @staticmethod def axisinfo(unit, axis): 'return the Foo AxisInfo' diff --git a/examples/user_interfaces/fourier_demo_wx.py b/examples/user_interfaces/fourier_demo_wx.py index e60e8d90df23..0843ac56e3b1 100644 --- a/examples/user_interfaces/fourier_demo_wx.py +++ b/examples/user_interfaces/fourier_demo_wx.py @@ -9,7 +9,7 @@ from matplotlib.pyplot import gcf, setp -class Knob: +class Knob(object): """ Knob - simple class with a "setKnob" method. A Knob instance is attached to a Param instance, e.g., param.attach(knob) @@ -20,7 +20,7 @@ def setKnob(self, value): pass -class Param: +class Param(object): """ The idea of the "Param" class is that some parameter in the GUI may have several knobs that both control it and reflect the parameter's state, e.g. diff --git a/examples/user_interfaces/interactive2.py b/examples/user_interfaces/interactive2.py index 6206b1373fa9..3b40f0987890 100755 --- a/examples/user_interfaces/interactive2.py +++ b/examples/user_interfaces/interactive2.py @@ -33,7 +33,7 @@ """ -class Completer: +class Completer(object): """ Taken from rlcompleter, with readline references stripped, and a local dictionary to use. """ @@ -112,7 +112,7 @@ def get_class_members(klass): return ret -class OutputStream: +class OutputStream(object): """ A Multiplexing output stream. It can replace another stream, and tee output to the original stream and too diff --git a/examples/user_interfaces/mpl_with_glade.py b/examples/user_interfaces/mpl_with_glade.py index 046b4cd83cba..3449df51eae2 100755 --- a/examples/user_interfaces/mpl_with_glade.py +++ b/examples/user_interfaces/mpl_with_glade.py @@ -31,14 +31,14 @@ def simple_msg(msg, parent=None, title=None): return None -class GladeHandlers: +class GladeHandlers(object): def on_buttonClickMe_clicked(event): simple_msg('Nothing to say, really', parent=widgets['windowMain'], title='Thanks!') -class WidgetsWrapper: +class WidgetsWrapper(object): def __init__(self): self.widgets = gtk.glade.XML('mpl_with_glade.glade') self.widgets.signal_autoconnect(GladeHandlers.__dict__) diff --git a/examples/user_interfaces/mpl_with_glade_316.py b/examples/user_interfaces/mpl_with_glade_316.py index 60584e2ad8ab..5284dcfdcd69 100644 --- a/examples/user_interfaces/mpl_with_glade_316.py +++ b/examples/user_interfaces/mpl_with_glade_316.py @@ -8,7 +8,7 @@ from matplotlib.backends.backend_gtk3agg import FigureCanvasGTK3Agg as FigureCanvas -class Window1Signals: +class Window1Signals(object): def on_window1_destroy(self, widget): Gtk.main_quit() diff --git a/examples/widgets/buttons.py b/examples/widgets/buttons.py index 54c42a3808da..d2655211ccab 100644 --- a/examples/widgets/buttons.py +++ b/examples/widgets/buttons.py @@ -12,7 +12,7 @@ l, = plt.plot(t, s, lw=2) -class Index: +class Index(object): ind = 0 def next(self, event): diff --git a/examples/widgets/menu.py b/examples/widgets/menu.py index 8a2744edac33..5000f965e5a9 100644 --- a/examples/widgets/menu.py +++ b/examples/widgets/menu.py @@ -9,7 +9,7 @@ import matplotlib.image as image -class ItemProperties: +class ItemProperties(object): def __init__(self, fontsize=14, labelcolor='black', bgcolor='yellow', alpha=1.0): self.fontsize = fontsize @@ -118,7 +118,7 @@ def set_hover(self, event): return changed -class Menu: +class Menu(object): def __init__(self, fig, menuitems): self.figure = fig fig.suppressComposite = True diff --git a/lib/matplotlib/__init__.py b/lib/matplotlib/__init__.py index 66e2eb5e83c5..b8d7a96af664 100644 --- a/lib/matplotlib/__init__.py +++ b/lib/matplotlib/__init__.py @@ -244,7 +244,7 @@ def _is_writable_dir(p): return True -class Verbose: +class Verbose(object): """ A class to handle reporting. Set the fileo attribute to any file instance to handle the output. Default is sys.stdout diff --git a/lib/matplotlib/animation.py b/lib/matplotlib/animation.py index 00e61f13f008..371f6512d7d9 100644 --- a/lib/matplotlib/animation.py +++ b/lib/matplotlib/animation.py @@ -380,7 +380,7 @@ def cleanup(self): # Base class of ffmpeg information. Has the config keys and the common set # of arguments that controls the *output* side of things. -class FFMpegBase: +class FFMpegBase(object): exec_key = 'animation.ffmpeg_path' args_key = 'animation.ffmpeg_args' @@ -450,7 +450,7 @@ class AVConvFileWriter(AVConvBase, FFMpegFileWriter): # Base class of mencoder information. Contains configuration key information # as well as arguments for controlling *output* -class MencoderBase: +class MencoderBase(object): exec_key = 'animation.mencoder_path' args_key = 'animation.mencoder_args' @@ -509,7 +509,7 @@ def _args(self): # Base class for animated GIFs with convert utility -class ImageMagickBase: +class ImageMagickBase(object): exec_key = 'animation.convert_path' args_key = 'animation.convert_args' diff --git a/lib/matplotlib/artist.py b/lib/matplotlib/artist.py index 957398b335e1..af9155c40dd6 100644 --- a/lib/matplotlib/artist.py +++ b/lib/matplotlib/artist.py @@ -873,7 +873,7 @@ def matchfunc(x): return artists -class ArtistInspector: +class ArtistInspector(object): """ A helper class to inspect an :class:`~matplotlib.artist.Artist` and return information about it's settable properties and their diff --git a/lib/matplotlib/axis.py b/lib/matplotlib/axis.py index 5d048a5372bc..62b3536d68da 100644 --- a/lib/matplotlib/axis.py +++ b/lib/matplotlib/axis.py @@ -590,7 +590,7 @@ def get_view_interval(self): return self.axes.viewLim.intervaly -class Ticker: +class Ticker(object): locator = None formatter = None diff --git a/lib/matplotlib/backend_bases.py b/lib/matplotlib/backend_bases.py index 6156b27e9b07..fc6f7b56da00 100644 --- a/lib/matplotlib/backend_bases.py +++ b/lib/matplotlib/backend_bases.py @@ -741,7 +741,7 @@ def stop_filter(self, filter_func): pass -class GraphicsContextBase: +class GraphicsContextBase(object): """ An abstract base class that provides color, line styles, etc... """ @@ -1280,7 +1280,7 @@ def _on_timer(self): self.stop() -class Event: +class Event(object): """ A matplotlib event. Attach additional attributes as defined in :meth:`FigureCanvasBase.mpl_connect`. The following attributes @@ -2595,7 +2595,7 @@ def set_window_title(self, title): pass -class Cursors: +class Cursors(object): # this class is only used as a simple namespace HAND, POINTER, SELECT_REGION, MOVE = list(range(4)) cursors = Cursors() diff --git a/lib/matplotlib/backends/backend_gtk.py b/lib/matplotlib/backends/backend_gtk.py index 4135c8bc8c07..1a6ee313f546 100644 --- a/lib/matplotlib/backends/backend_gtk.py +++ b/lib/matplotlib/backends/backend_gtk.py @@ -873,7 +873,7 @@ def get_filename_from_user (self): return filename, self.ext -class DialogLineprops: +class DialogLineprops(object): """ A GUI dialog for controlling lineprops """ diff --git a/lib/matplotlib/backends/backend_gtk3.py b/lib/matplotlib/backends/backend_gtk3.py index eab6564a2667..4d32873f19d7 100644 --- a/lib/matplotlib/backends/backend_gtk3.py +++ b/lib/matplotlib/backends/backend_gtk3.py @@ -699,7 +699,7 @@ def get_filename_from_user (self): return filename, self.ext -class DialogLineprops: +class DialogLineprops(object): """ A GUI dialog for controlling lineprops """ diff --git a/lib/matplotlib/backends/backend_pgf.py b/lib/matplotlib/backends/backend_pgf.py index 6ae2867b00a9..cfa30fce0d9b 100644 --- a/lib/matplotlib/backends/backend_pgf.py +++ b/lib/matplotlib/backends/backend_pgf.py @@ -212,7 +212,7 @@ def __init__(self, message, latex_output=""): self.latex_output = latex_output -class LatexManagerFactory: +class LatexManagerFactory(object): previous_instance = None @staticmethod @@ -233,7 +233,7 @@ def get_latex_manager(): LatexManagerFactory.previous_instance = new_inst return new_inst -class WeakSet: +class WeakSet(object): # TODO: Poor man's weakref.WeakSet. # Remove this once python 2.6 support is dropped from matplotlib. @@ -251,7 +251,7 @@ def __iter__(self): return six.iterkeys(self.weak_key_dict) -class LatexManager: +class LatexManager(object): """ The LatexManager opens an instance of the LaTeX application for determining the metrics of text elements. The LaTeX environment can be @@ -737,7 +737,7 @@ def new_figure_manager_given_figure(num, figure): return manager -class TmpDirCleaner: +class TmpDirCleaner(object): remaining_tmpdirs = set() @staticmethod diff --git a/lib/matplotlib/backends/backend_svg.py b/lib/matplotlib/backends/backend_svg.py index 89e4d5986fb8..5bfd58c85e9b 100644 --- a/lib/matplotlib/backends/backend_svg.py +++ b/lib/matplotlib/backends/backend_svg.py @@ -92,7 +92,7 @@ def escape_attrib(s): # @param file A file or file-like object. This object must implement # a write method that takes an 8-bit string. -class XMLWriter: +class XMLWriter(object): def __init__(self, file): self.__write = file.write if hasattr(file, "flush"): diff --git a/lib/matplotlib/backends/backend_tkagg.py b/lib/matplotlib/backends/backend_tkagg.py index 8df5f0536916..e2f122103a8e 100644 --- a/lib/matplotlib/backends/backend_tkagg.py +++ b/lib/matplotlib/backends/backend_tkagg.py @@ -604,7 +604,7 @@ def full_screen_toggle(self): self.window.attributes('-fullscreen', not is_fullscreen) -class AxisMenu: +class AxisMenu(object): def __init__(self, master, naxes): self._master = master self._naxes = naxes diff --git a/lib/matplotlib/backends/backend_wx.py b/lib/matplotlib/backends/backend_wx.py index d99f04f07ea9..d7b286006dac 100644 --- a/lib/matplotlib/backends/backend_wx.py +++ b/lib/matplotlib/backends/backend_wx.py @@ -102,7 +102,7 @@ def debug_on_error(type, value, tb): print() pdb.pm() # jdh uncomment -class fake_stderr: +class fake_stderr(object): """Wx does strange things with stderr, as it makes the assumption that there is probably no console. This redirects stderr to the console, since we know that there is one!""" diff --git a/lib/matplotlib/backends/windowing.py b/lib/matplotlib/backends/windowing.py index afe4c908dab9..6c2e495906cb 100644 --- a/lib/matplotlib/backends/windowing.py +++ b/lib/matplotlib/backends/windowing.py @@ -23,7 +23,7 @@ def GetForegroundWindow(): def SetForegroundWindow(hwnd): pass -class FocusManager: +class FocusManager(object): def __init__(self): self._shellWindow = GetForegroundWindow() diff --git a/lib/matplotlib/cbook.py b/lib/matplotlib/cbook.py index 5160f3180113..538e0d19d207 100644 --- a/lib/matplotlib/cbook.py +++ b/lib/matplotlib/cbook.py @@ -434,7 +434,7 @@ def __ne__(self, other): return not self.__eq__(other) -class CallbackRegistry: +class CallbackRegistry(object): """ Handle registering and disconnecting for a set of signals and callbacks: @@ -641,7 +641,7 @@ def strip_math(s): return s -class Bunch: +class Bunch(object): """ Often we want to just collect a bunch of stuff together, naming each item of the bunch; a dictionary's OK for that, but a small do- nothing @@ -847,7 +847,7 @@ def flatten(seq, scalarp=is_scalar_or_string): yield subitem -class Sorter: +class Sorter(object): """ Sort by attribute or item @@ -955,7 +955,7 @@ def soundex(name, len=4): return (sndx + (len * '0'))[:len] -class Null: +class Null(object): """ Null objects always and reliably "do nothing." """ def __init__(self, *args, **kwargs): @@ -1008,7 +1008,7 @@ def mkdirs(newdir, mode=0o777): raise -class GetRealpathAndStat: +class GetRealpathAndStat(object): def __init__(self): self._cache = {} @@ -1036,7 +1036,7 @@ def dict_delall(d, keys): pass -class RingBuffer: +class RingBuffer(object): """ class that implements a not-yet-full buffer """ def __init__(self, size_max): self.max = size_max @@ -1499,7 +1499,7 @@ def safe_masked_invalid(x): return xm -class MemoryMonitor: +class MemoryMonitor(object): def __init__(self, nmax=20000): self._nmax = nmax self._mem = np.zeros((self._nmax,), np.int32) diff --git a/lib/matplotlib/cm.py b/lib/matplotlib/cm.py index d6169520cc83..90795c754186 100644 --- a/lib/matplotlib/cm.py +++ b/lib/matplotlib/cm.py @@ -163,7 +163,7 @@ def get_cmap(name=None, lut=None): % (name, ', '.join(cmap_d.keys()))) -class ScalarMappable: +class ScalarMappable(object): """ This is a mixin class to support scalar data to RGBA mapping. The ScalarMappable makes use of data normalization before returning diff --git a/lib/matplotlib/contour.py b/lib/matplotlib/contour.py index 0d74a3a8461d..b9dbe233bdf9 100644 --- a/lib/matplotlib/contour.py +++ b/lib/matplotlib/contour.py @@ -53,7 +53,7 @@ def get_rotation(self): return new_angles[0] -class ContourLabeler: +class ContourLabeler(object): """Mixin to provide labelling capability to ContourSet""" def clabel(self, *args, **kwargs): diff --git a/lib/matplotlib/dates.py b/lib/matplotlib/dates.py index 385fcbbd88fb..c2ade94c89fc 100755 --- a/lib/matplotlib/dates.py +++ b/lib/matplotlib/dates.py @@ -244,7 +244,7 @@ def _from_ordinalf(x, tz=None): _from_ordinalf_np_vectorized = np.vectorize(_from_ordinalf) -class strpdate2num: +class strpdate2num(object): """ Use this class to parse date strings to matplotlib datenums when you know the date format string of the date you are parsing. See @@ -587,7 +587,7 @@ def __call__(self, x, pos=None): return result -class rrulewrapper: +class rrulewrapper(object): def __init__(self, freq, **kwargs): self._construct = kwargs.copy() diff --git a/lib/matplotlib/figure.py b/lib/matplotlib/figure.py index b334ca4edf88..76bf778d104a 100644 --- a/lib/matplotlib/figure.py +++ b/lib/matplotlib/figure.py @@ -151,7 +151,7 @@ def __contains__(self, a): return a in self.as_list() -class SubplotParams: +class SubplotParams(object): """ A class to hold the parameters for a subplot """ diff --git a/lib/matplotlib/fontconfig_pattern.py b/lib/matplotlib/fontconfig_pattern.py index 3dea5ddba549..cb029b90db7c 100644 --- a/lib/matplotlib/fontconfig_pattern.py +++ b/lib/matplotlib/fontconfig_pattern.py @@ -36,7 +36,7 @@ value_unescape = re.compile(r'\\([%s])' % value_punc).sub value_escape = re.compile(r'([%s])' % value_punc).sub -class FontconfigPatternParser: +class FontconfigPatternParser(object): """A simple pyparsing-based parser for fontconfig-style patterns. See the `fontconfig pattern specification diff --git a/lib/matplotlib/hatch.py b/lib/matplotlib/hatch.py index 6729b610997c..94294afdf8a8 100644 --- a/lib/matplotlib/hatch.py +++ b/lib/matplotlib/hatch.py @@ -12,7 +12,7 @@ from matplotlib.path import Path -class HatchPatternBase: +class HatchPatternBase(object): """ The base class for a hatch pattern. """ diff --git a/lib/matplotlib/lines.py b/lib/matplotlib/lines.py index f9098d547de8..09fc968b04d1 100644 --- a/lib/matplotlib/lines.py +++ b/lib/matplotlib/lines.py @@ -1312,7 +1312,7 @@ def is_dashed(self): return self._linestyle in ('--', '-.', ':') -class VertexSelector: +class VertexSelector(object): """ Manage the callbacks to maintain a list of selected vertices for :class:`matplotlib.lines.Line2D`. Derived classes should override diff --git a/lib/matplotlib/mlab.py b/lib/matplotlib/mlab.py index 3aab563e40bb..f214253fc88c 100644 --- a/lib/matplotlib/mlab.py +++ b/lib/matplotlib/mlab.py @@ -1653,7 +1653,7 @@ def prepca(P, frac=0): return Pcomponents, Trans, fracVar[ind] -class PCA: +class PCA(object): def __init__(self, a, standardize=True): """ compute the SVD of a and store data for PCA. Use project to @@ -2057,7 +2057,7 @@ def fftsurr(x, detrend=detrend_none, window=window_none): return np.fft.ifft(z).real -class FIFOBuffer: +class FIFOBuffer(object): """ A FIFO queue to hold incoming *x*, *y* data in a rotating buffer using numpy arrays under the hood. It is assumed that you will @@ -3107,7 +3107,7 @@ def get_converters(reader): # a series of classes for describing the format intentions of various rec views -class FormatObj: +class FormatObj(object): def tostr(self, x): return self.toval(x) diff --git a/lib/matplotlib/rcsetup.py b/lib/matplotlib/rcsetup.py index fec9c6bc02af..a716e541d3eb 100644 --- a/lib/matplotlib/rcsetup.py +++ b/lib/matplotlib/rcsetup.py @@ -38,7 +38,7 @@ all_backends = interactive_bk + non_interactive_bk -class ValidateInStrings: +class ValidateInStrings(object): def __init__(self, key, valid, ignorecase=False): 'valid is a list of legal strings' self.key = key @@ -172,7 +172,7 @@ def validate_maskedarray(v): ' please delete it from your matplotlibrc file') -class validate_nseq_float: +class validate_nseq_float(object): def __init__(self, n): self.n = n @@ -195,7 +195,7 @@ def __call__(self, s): return [float(val) for val in s] -class validate_nseq_int: +class validate_nseq_int(object): def __init__(self, n): self.n = n @@ -443,7 +443,7 @@ def validate_sketch(s): raise ValueError("path.sketch must be a tuple (scale, length, randomness)") return result -class ValidateInterval: +class ValidateInterval(object): """ Value must be in interval """ diff --git a/lib/matplotlib/sankey.py b/lib/matplotlib/sankey.py index e31c1ac53679..653d6f377966 100755 --- a/lib/matplotlib/sankey.py +++ b/lib/matplotlib/sankey.py @@ -57,7 +57,7 @@ DOWN = 3 -class Sankey: +class Sankey(object): """ Sankey diagram in matplotlib diff --git a/lib/matplotlib/testing/jpl_units/Duration.py b/lib/matplotlib/testing/jpl_units/Duration.py index 0edd9c2c156f..4d71c78e8270 100644 --- a/lib/matplotlib/testing/jpl_units/Duration.py +++ b/lib/matplotlib/testing/jpl_units/Duration.py @@ -19,7 +19,7 @@ #=========================================================================== #=========================================================================== -class Duration: +class Duration(object): """Class Duration in development. """ allowed = [ "ET", "UTC" ] diff --git a/lib/matplotlib/testing/jpl_units/Epoch.py b/lib/matplotlib/testing/jpl_units/Epoch.py index d74949c4c930..91b4c127eb5c 100644 --- a/lib/matplotlib/testing/jpl_units/Epoch.py +++ b/lib/matplotlib/testing/jpl_units/Epoch.py @@ -23,7 +23,7 @@ #=========================================================================== #=========================================================================== -class Epoch: +class Epoch(object): # Frame conversion offsets in seconds # t(TO) = t(FROM) + allowed[ FROM ][ TO ] allowed = { diff --git a/lib/matplotlib/testing/jpl_units/UnitDbl.py b/lib/matplotlib/testing/jpl_units/UnitDbl.py index a72483cf54f6..4eca2fb30951 100644 --- a/lib/matplotlib/testing/jpl_units/UnitDbl.py +++ b/lib/matplotlib/testing/jpl_units/UnitDbl.py @@ -20,7 +20,7 @@ #=========================================================================== -class UnitDbl: +class UnitDbl(object): """Class UnitDbl in development. """ #----------------------------------------------------------------------- diff --git a/lib/matplotlib/tests/test_cbook.py b/lib/matplotlib/tests/test_cbook.py index 61d69fd76efd..416fa0c74020 100644 --- a/lib/matplotlib/tests/test_cbook.py +++ b/lib/matplotlib/tests/test_cbook.py @@ -43,7 +43,7 @@ def test_restrict_dict(): assert_equal(d, {'foo': 'bar', 1: 2}) -class Test_delete_masked_points: +class Test_delete_masked_points(object): def setUp(self): self.mask1 = [False, False, True, True, False, False] self.arr0 = np.arange(1.0, 7.0) @@ -95,7 +95,7 @@ def test_allequal(): assert(not cbook.allequal(('a', 'b'))) -class Test_boxplot_stats: +class Test_boxplot_stats(object): def setup(self): np.random.seed(937) self.nrows = 37 diff --git a/lib/matplotlib/texmanager.py b/lib/matplotlib/texmanager.py index 8ff931a0d410..5d52e7d8362a 100644 --- a/lib/matplotlib/texmanager.py +++ b/lib/matplotlib/texmanager.py @@ -86,7 +86,7 @@ def dvipng_hack_alpha(): return False -class TexManager: +class TexManager(object): """ Convert strings to dvi files using TeX, caching the results to a working dir diff --git a/lib/matplotlib/ticker.py b/lib/matplotlib/ticker.py index b1ba08349fc5..25148feb8cf6 100644 --- a/lib/matplotlib/ticker.py +++ b/lib/matplotlib/ticker.py @@ -1145,7 +1145,7 @@ def closeto(x, y): return False -class Base: +class Base(object): 'this solution has some hacks to deal with floating point inaccuracies' def __init__(self, base): assert(base > 0) diff --git a/lib/matplotlib/tri/triinterpolate.py b/lib/matplotlib/tri/triinterpolate.py index 998c01881208..1e53e7dbf398 100644 --- a/lib/matplotlib/tri/triinterpolate.py +++ b/lib/matplotlib/tri/triinterpolate.py @@ -1244,7 +1244,7 @@ def compute_dz(self): # The following private :class:_Sparse_Matrix_coo and :func:_cg provide # a PCG sparse solver for (symmetric) elliptic problems. -class _Sparse_Matrix_coo: +class _Sparse_Matrix_coo(object): def __init__(self, vals, rows, cols, shape): """ Creates a sparse matrix in coo format diff --git a/lib/matplotlib/units.py b/lib/matplotlib/units.py index 24df5a350c6d..b7f8ca364fbe 100644 --- a/lib/matplotlib/units.py +++ b/lib/matplotlib/units.py @@ -51,7 +51,7 @@ def default_units(x, axis): import numpy as np -class AxisInfo: +class AxisInfo(object): """information to support default axis labeling and tick labeling, and default limits""" def __init__(self, majloc=None, minloc=None, @@ -72,7 +72,7 @@ def __init__(self, majloc=None, minloc=None, self.default_limits = default_limits -class ConversionInterface: +class ConversionInterface(object): """ The minimal interface for a converter to take custom instances (or sequences) and convert them to values mpl can use diff --git a/lib/matplotlib/widgets.py b/lib/matplotlib/widgets.py index 4db0985d9d71..73cf771322f6 100644 --- a/lib/matplotlib/widgets.py +++ b/lib/matplotlib/widgets.py @@ -23,7 +23,7 @@ from .transforms import blended_transform_factory -class LockDraw: +class LockDraw(object): """ Some widgets, like the cursor, draw onto the canvas, and this is not desirable under all circumstances, like when the toolbar is in diff --git a/lib/mpl_toolkits/axes_grid1/axes_divider.py b/lib/mpl_toolkits/axes_grid1/axes_divider.py index 5f3e336bcd78..67fbf3394e79 100644 --- a/lib/mpl_toolkits/axes_grid1/axes_divider.py +++ b/lib/mpl_toolkits/axes_grid1/axes_divider.py @@ -839,7 +839,7 @@ def locate(self, nx, ny, nx1=None, ny1=None, axes=None, renderer=None): return mtransforms.Bbox.from_bounds(x1, y1, w1, h1) -class LocatableAxesBase: +class LocatableAxesBase(object): def __init__(self, *kl, **kw): self._axes_class.__init__(self, *kl, **kw) diff --git a/lib/mpl_toolkits/axes_grid1/parasite_axes.py b/lib/mpl_toolkits/axes_grid1/parasite_axes.py index ca865e0c7806..c9f4869a4357 100644 --- a/lib/mpl_toolkits/axes_grid1/parasite_axes.py +++ b/lib/mpl_toolkits/axes_grid1/parasite_axes.py @@ -23,7 +23,7 @@ is_string_like = cbook.is_string_like -class ParasiteAxesBase: +class ParasiteAxesBase(object): def get_images_artists(self): artists = set([a for a in self.get_children() if a.get_visible()]) @@ -81,7 +81,7 @@ def _get_base_axes_attr(self, attrname): -class ParasiteAxesAuxTransBase: +class ParasiteAxesAuxTransBase(object): def __init__(self, parent_axes, aux_transform, viewlim_mode=None, **kwargs): @@ -242,7 +242,7 @@ def _get_handles(ax): return handles -class HostAxesBase: +class HostAxesBase(object): def __init__(self, *args, **kwargs): self.parasites = [] diff --git a/lib/mpl_toolkits/axisartist/axisline_style.py b/lib/mpl_toolkits/axisartist/axisline_style.py index d87530444a65..876f5fe18985 100644 --- a/lib/mpl_toolkits/axisartist/axisline_style.py +++ b/lib/mpl_toolkits/axisartist/axisline_style.py @@ -8,7 +8,7 @@ from matplotlib.path import Path import numpy as np -class _FancyAxislineStyle: +class _FancyAxislineStyle(object): class SimpleArrow(FancyArrowPatch): """ The artist class that will be returned for SimpleArrow style. diff --git a/lib/mpl_toolkits/axisartist/axislines.py b/lib/mpl_toolkits/axisartist/axislines.py index 749e09b6a244..5b9ff70cd1bf 100644 --- a/lib/mpl_toolkits/axisartist/axislines.py +++ b/lib/mpl_toolkits/axisartist/axislines.py @@ -242,7 +242,7 @@ def get_line(self, axes): -class AxisArtistHelperRectlinear: +class AxisArtistHelperRectlinear(object): class Fixed(AxisArtistHelper.Fixed):