From 3d6787bb7abb1e547a1b3ad3dc2de3cd9fe34bea Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 17 Dec 2009 14:43:34 -0500 Subject: [PATCH] All classes should at least subclass 'object' to avoid being old-style classes. See, for example http://www.python.org/doc/newstyle/ http://www.python.org/doc/2.5.2/ref/node33.html --- hooke/libhooke.py | 6 +++--- hooke/libhookecurve.py | 4 ++-- hooke/plugin/autopeak.py | 2 +- hooke/plugin/cut.py | 2 +- hooke/plugin/fit.py | 2 +- hooke/plugin/flatfilts.py | 4 ++-- hooke/plugin/generalclamp.py | 2 +- hooke/plugin/generaltccd.py | 2 +- hooke/plugin/generalvclamp.py | 2 +- hooke/plugin/macro.py | 2 +- hooke/plugin/massanalysis.py | 2 +- hooke/plugin/multidistance.py | 2 +- hooke/plugin/pcluster.py | 2 +- hooke/plugin/procplots.py | 2 +- hooke/plugin/superimpose.py | 2 +- hooke/plugin/tutorial.py | 2 +- hooke/plugin/viewer.py | 2 +- 17 files changed, 21 insertions(+), 21 deletions(-) diff --git a/hooke/libhooke.py b/hooke/libhooke.py index 69101c8..247df8b 100755 --- a/hooke/libhooke.py +++ b/hooke/libhooke.py @@ -25,7 +25,7 @@ import csv HOOKE_VERSION=['0.8.3_devel', 'Seinei', '2008-04-16'] WX_GOOD=['2.6','2.8'] -class PlaylistXML: +class PlaylistXML(object): ''' This module allows for import/export of an XML playlist into/out of a list of HookeCurve objects ''' @@ -132,7 +132,7 @@ class PlaylistXML: outfile.close() -class HookeConfig: +class HookeConfig(object): ''' Handling of Hooke configuration file @@ -248,7 +248,7 @@ class HookeConfig: pass -class ClickedPoint: +class ClickedPoint(object): ''' this class defines what a clicked point on the curve plot is ''' diff --git a/hooke/libhookecurve.py b/hooke/libhookecurve.py index 5b83e0c..0bb4a49 100755 --- a/hooke/libhookecurve.py +++ b/hooke/libhookecurve.py @@ -22,7 +22,7 @@ class HookeCurve(object): return False -class Driver: +class Driver(object): ''' Base class for file format drivers. @@ -50,7 +50,7 @@ class Driver: return [dummy_default] -class PlotObject: +class PlotObject(object): def __init__(self): diff --git a/hooke/plugin/autopeak.py b/hooke/plugin/autopeak.py index c5aac95..17a30ed 100644 --- a/hooke/plugin/autopeak.py +++ b/hooke/plugin/autopeak.py @@ -14,7 +14,7 @@ import warnings warnings.simplefilter('ignore',np.RankWarning) -class autopeakCommands: +class autopeakCommands(object): def do_autopeak(self,args): ''' diff --git a/hooke/plugin/cut.py b/hooke/plugin/cut.py index b84e507..41cbedb 100644 --- a/hooke/plugin/cut.py +++ b/hooke/plugin/cut.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -class cutCommands: +class cutCommands(object): def _plug_init(self): self.cut_basecurrent=None diff --git a/hooke/plugin/fit.py b/hooke/plugin/fit.py index 3193faa..7ab6037 100755 --- a/hooke/plugin/fit.py +++ b/hooke/plugin/fit.py @@ -27,7 +27,7 @@ global events_from_fit events_from_fit=Queue.Queue() #GUI ---> CLI COMMUNICATION -class fitCommands: +class fitCommands(object): def _plug_init(self): self.wlccurrent=None diff --git a/hooke/plugin/flatfilts.py b/hooke/plugin/flatfilts.py index a2cc569..09dc3db 100755 --- a/hooke/plugin/flatfilts.py +++ b/hooke/plugin/flatfilts.py @@ -24,7 +24,7 @@ import libpeakspot as lps import libhookecurve as lhc -class flatfiltsCommands: +class flatfiltsCommands(object): def _plug_init(self): #configurate convfilt variables @@ -364,7 +364,7 @@ class flatfiltsCommands: ######################### #HANDLING OF CONFIGURATION FILE -class ConvfiltConfig: +class ConvfiltConfig(object): ''' Handling of convfilt configuration file diff --git a/hooke/plugin/generalclamp.py b/hooke/plugin/generalclamp.py index 327e585..e3c6fe1 100644 --- a/hooke/plugin/generalclamp.py +++ b/hooke/plugin/generalclamp.py @@ -9,7 +9,7 @@ import libhookecurve as lhc wxversion.select(WX_GOOD) from wx import PostEvent -class generalclampCommands: +class generalclampCommands(object): def plotmanip_clamp(self, plot, current, customvalue=False): ''' diff --git a/hooke/plugin/generaltccd.py b/hooke/plugin/generaltccd.py index 1b95049..395da08 100644 --- a/hooke/plugin/generaltccd.py +++ b/hooke/plugin/generaltccd.py @@ -4,7 +4,7 @@ generaltccd.py General utilities for TCCD stuff ''' -class generaltccdCommands: +class generaltccdCommands(object): def plotmanip_threshold(self, plot, current, customvalue=False): ''' diff --git a/hooke/plugin/generalvclamp.py b/hooke/plugin/generalvclamp.py index 32beaf0..2813150 100644 --- a/hooke/plugin/generalvclamp.py +++ b/hooke/plugin/generalvclamp.py @@ -18,7 +18,7 @@ import warnings warnings.simplefilter('ignore',np.RankWarning) -class generalvclampCommands: +class generalvclampCommands(object): def _plug_init(self): self.basecurrent=None diff --git a/hooke/plugin/macro.py b/hooke/plugin/macro.py index 800d311..88d13a5 100644 --- a/hooke/plugin/macro.py +++ b/hooke/plugin/macro.py @@ -10,7 +10,7 @@ import libinput as linput import os.path import string -class macroCommands: +class macroCommands(object): currentmacro=[] pause=0 diff --git a/hooke/plugin/massanalysis.py b/hooke/plugin/massanalysis.py index 6fcb03d..0a36657 100644 --- a/hooke/plugin/massanalysis.py +++ b/hooke/plugin/massanalysis.py @@ -16,7 +16,7 @@ import numpy as np import csv -class massanalysisCommands: +class massanalysisCommands(object): def _plug_init(self): self.mass_variables={} diff --git a/hooke/plugin/multidistance.py b/hooke/plugin/multidistance.py index adda783..517a286 100644 --- a/hooke/plugin/multidistance.py +++ b/hooke/plugin/multidistance.py @@ -13,7 +13,7 @@ import warnings warnings.simplefilter('ignore',np.RankWarning) -class multidistanceCommands: +class multidistanceCommands(object): def do_multidistance(self,args): ''' diff --git a/hooke/plugin/pcluster.py b/hooke/plugin/pcluster.py index 5f51939..2e16620 100644 --- a/hooke/plugin/pcluster.py +++ b/hooke/plugin/pcluster.py @@ -15,7 +15,7 @@ import warnings warnings.simplefilter('ignore',np.RankWarning) -class pclusterCommands: +class pclusterCommands(object): def _plug_init(self): self.clustplot1=None diff --git a/hooke/plugin/procplots.py b/hooke/plugin/procplots.py index 68e7f8f..612ae0b 100755 --- a/hooke/plugin/procplots.py +++ b/hooke/plugin/procplots.py @@ -15,7 +15,7 @@ import scipy as sp import scipy.signal import copy -class procplotsCommands: +class procplotsCommands(object): def _plug_init(self): pass diff --git a/hooke/plugin/superimpose.py b/hooke/plugin/superimpose.py index ce10e99..41083f6 100644 --- a/hooke/plugin/superimpose.py +++ b/hooke/plugin/superimpose.py @@ -6,7 +6,7 @@ from wx import PostEvent import libhookecurve as lhc from numpy import arange, mean -class superimposeCommands: +class superimposeCommands(object): def _plug_init(self): self.imposed=[] diff --git a/hooke/plugin/tutorial.py b/hooke/plugin/tutorial.py index ad7a6fe..50a0d78 100755 --- a/hooke/plugin/tutorial.py +++ b/hooke/plugin/tutorial.py @@ -19,7 +19,7 @@ SYNTAX OF DATA TYPE DECLARATION: ''' -class tutorialCommands: +class tutorialCommands(object): ''' Here we define the class containing all the Hooke commands we want to define in the plugin. diff --git a/hooke/plugin/viewer.py b/hooke/plugin/viewer.py index 961b6a2..7a6881d 100644 --- a/hooke/plugin/viewer.py +++ b/hooke/plugin/viewer.py @@ -10,7 +10,7 @@ This program is released under the GNU General Public License version 2. import libviewer as lview import libinput as linput -class viewerCommands: +class viewerCommands(object): def _plug_init(self): self.viewerlist=[] -- 2.26.2