diff --git a/python/Gaffer/BlockedConnection.py b/python/Gaffer/BlockedConnection.py index 46f0fdfa827..65ff57d06d0 100644 --- a/python/Gaffer/BlockedConnection.py +++ b/python/Gaffer/BlockedConnection.py @@ -37,7 +37,7 @@ import Gaffer -class BlockedConnection() : +class BlockedConnection( object ) : def __init__( self, connectionOrConnections ) : diff --git a/python/Gaffer/OutputRedirection.py b/python/Gaffer/OutputRedirection.py index 86a5c86bcb4..a657e22cd2a 100644 --- a/python/Gaffer/OutputRedirection.py +++ b/python/Gaffer/OutputRedirection.py @@ -39,7 +39,7 @@ ## A threadsafe means of temporarily diverting sys.stdout and/or sys.stderr # to alternative functions. -class OutputRedirection : +class OutputRedirection( object ) : def __init__( self, stdOut = None, stdErr = None ) : @@ -73,7 +73,7 @@ def __exit__( self, type, value, traceBack ) : __sysLock = threading.RLock() _streams = threading.local() -class _StdOut() : +class _StdOut( object ) : def write( self, text ) : @@ -83,7 +83,7 @@ def write( self, text ) : else : OutputRedirection._originalStdOut.write( text ) -class _StdErr() : +class _StdErr( object ) : def write( self, text ) : diff --git a/python/Gaffer/UndoContext.py b/python/Gaffer/UndoContext.py index 4036a8caf3f..4ab9a4f9a9c 100644 --- a/python/Gaffer/UndoContext.py +++ b/python/Gaffer/UndoContext.py @@ -37,7 +37,7 @@ from _Gaffer import _UndoContext -class UndoContext() : +class UndoContext( object ) : State = _UndoContext.State diff --git a/python/GafferCortex/OpMatcher.py b/python/GafferCortex/OpMatcher.py index 74204a000bc..35286f0dfcd 100644 --- a/python/GafferCortex/OpMatcher.py +++ b/python/GafferCortex/OpMatcher.py @@ -54,7 +54,7 @@ # # ["OpMatcher"]["ignore"] - when this BoolData is True, the Parameter is not # considered by the matcher. -class OpMatcher() : +class OpMatcher( object ) : def __init__( self, classLoader, classNamesMatchString = "*", reportErrors=True ) : diff --git a/python/GafferDispatch/LocalDispatcher.py b/python/GafferDispatch/LocalDispatcher.py index dc41ba36695..03d1e0e313f 100644 --- a/python/GafferDispatch/LocalDispatcher.py +++ b/python/GafferDispatch/LocalDispatcher.py @@ -59,7 +59,7 @@ def __init__( self, name = "LocalDispatcher", jobPool = None ) : self.__jobPool = jobPool if jobPool else LocalDispatcher.defaultJobPool() - class Job : + class Job( object ) : Status = IECore.Enum.create( "Waiting", "Running", "Complete", "Failed", "Killed" ) diff --git a/python/GafferRenderManUI/RenderManShaderUI.py b/python/GafferRenderManUI/RenderManShaderUI.py index 718d2c1eb2c..2bd254df57e 100644 --- a/python/GafferRenderManUI/RenderManShaderUI.py +++ b/python/GafferRenderManUI/RenderManShaderUI.py @@ -337,7 +337,7 @@ def __parameterActivators( parent ) : node = parent.node() - class ExpressionVariables : + class ExpressionVariables( object ) : def connected( self, key ) : diff --git a/python/GafferSceneTest/SceneProceduralTest.py b/python/GafferSceneTest/SceneProceduralTest.py index 61506cc9f33..001b5b0e927 100644 --- a/python/GafferSceneTest/SceneProceduralTest.py +++ b/python/GafferSceneTest/SceneProceduralTest.py @@ -178,7 +178,7 @@ def findMesh( g ): def testAllRenderedSignal( self ) : - class AllRenderedTest : + class AllRenderedTest( object ) : allRenderedSignalCalled = False def allRendered( self ): self.allRenderedSignalCalled = True @@ -240,8 +240,5 @@ def allRendered( self ): self.assertEqual( t.allRenderedSignalCalled, True ) - - - if __name__ == "__main__": unittest.main() diff --git a/python/GafferTest/SignalsTest.py b/python/GafferTest/SignalsTest.py index a87cd470eed..226166f8643 100644 --- a/python/GafferTest/SignalsTest.py +++ b/python/GafferTest/SignalsTest.py @@ -203,7 +203,7 @@ def build( parent, depth=0 ) : # references to the T instance below were kept until another exception was thrown. def testExceptionRefCounting( self ) : - class T : + class T( object ) : def __init__( self, s ) : diff --git a/python/GafferTest/WeakMethodTest.py b/python/GafferTest/WeakMethodTest.py index 28a878fca5a..61efe173b8b 100644 --- a/python/GafferTest/WeakMethodTest.py +++ b/python/GafferTest/WeakMethodTest.py @@ -44,7 +44,7 @@ class WeakMethodTest( GafferTest.TestCase ) : def test( self ) : - class A() : + class A( object ) : def f( self ) : diff --git a/python/GafferTest/pythonScripts/variableScope.py b/python/GafferTest/pythonScripts/variableScope.py index bbd8fb46ba8..8b5b7aef1d9 100644 --- a/python/GafferTest/pythonScripts/variableScope.py +++ b/python/GafferTest/pythonScripts/variableScope.py @@ -36,11 +36,11 @@ # This script is used by PythonApplicationTest.py -class A() : +class A( object ) : pass -class B() : +class B( object ) : def __init__( self ) : diff --git a/python/GafferUI/Bookmarks.py b/python/GafferUI/Bookmarks.py index 7279bd9f348..ecda0315b63 100644 --- a/python/GafferUI/Bookmarks.py +++ b/python/GafferUI/Bookmarks.py @@ -45,7 +45,7 @@ ## The Bookmarks class provides a registry of named locations for use # in Path UIs. To allow different gaffer applications to coexist in the # same process, separate bookmarks are maintained per application. -class Bookmarks : +class Bookmarks( object ) : ## Use acquire() in preference to this constructor. def __init__( self, applicationRoot, pathType, category ) : diff --git a/python/GafferUI/DisplayTransform.py b/python/GafferUI/DisplayTransform.py index 2b91f97997d..7e7d77bc88f 100644 --- a/python/GafferUI/DisplayTransform.py +++ b/python/GafferUI/DisplayTransform.py @@ -44,7 +44,7 @@ # class allows the registration of a function to perform linear->display # transforms, and to signal when this is changed. It is expected that # specific application configurations will set this appropriately. -class DisplayTransform() : +class DisplayTransform( object ) : # have to store it inside a list so python doesn't # keep trying to turn it into a method. diff --git a/python/GafferUI/ErrorDialogue.py b/python/GafferUI/ErrorDialogue.py index 85f3b62525b..433496d4b59 100644 --- a/python/GafferUI/ErrorDialogue.py +++ b/python/GafferUI/ErrorDialogue.py @@ -112,7 +112,7 @@ def displayException( title="Error", messagePrefix=None, withDetails=True, paren dialogue.waitForButton( parentWindow=parentWindow ) ## A simple context manager which calls displayException() if any exceptions are caught. - class ExceptionHandler : + class ExceptionHandler( object ) : ## The keyword arguments will be passed to displayException(). def __init__( self, **kw ) : diff --git a/python/GafferUI/EventLoop.py b/python/GafferUI/EventLoop.py index 34ff42864b7..7476aaa14d9 100644 --- a/python/GafferUI/EventLoop.py +++ b/python/GafferUI/EventLoop.py @@ -48,7 +48,7 @@ QtGui = GafferUI._qtImport( "QtGui" ) ## This class provides the event loops used to run GafferUI based applications. -class EventLoop() : +class EventLoop( object ) : __RunStyle = IECore.Enum.create( "Normal", "PumpThread", "AlreadyRunning", "Houdini" ) diff --git a/python/GafferUI/Layouts.py b/python/GafferUI/Layouts.py index 00658cb7b0f..15a3bab2994 100644 --- a/python/GafferUI/Layouts.py +++ b/python/GafferUI/Layouts.py @@ -47,7 +47,7 @@ # sets of layouts are maintained on a per-application basis. Access # to the layouts for a specific application is provided by the # Layouts.acquire() method. -class Layouts : +class Layouts( object ) : ## Typically acquire() should be used in preference # to this constructor. diff --git a/python/GafferUI/NodeMenu.py b/python/GafferUI/NodeMenu.py index bdca27ced2b..71f1e5ce9af 100644 --- a/python/GafferUI/NodeMenu.py +++ b/python/GafferUI/NodeMenu.py @@ -50,7 +50,7 @@ # different applications to coexist happily in the same process, separate node # menus are maintained per application, and NodeMenu.acquire() is used to # obtain the appropriate menu. -class NodeMenu : +class NodeMenu( object ) : ## Chances are you want to use acquire() to get the NodeMenu for a # specific application, rather than construct one directly. diff --git a/python/GafferUI/Playback.py b/python/GafferUI/Playback.py index 4346baac1fb..70ca7065453 100644 --- a/python/GafferUI/Playback.py +++ b/python/GafferUI/Playback.py @@ -48,7 +48,7 @@ # controlling frame ranges and signalling changes in playback state. # All UI elements requiring such functionality should operate using # a Playback object to ensure synchronisation between elements. -class Playback : +class Playback( object ) : State = IECore.Enum.create( "PlayingForwards", "PlayingBackwards", "Scrubbing", "Stopped" ) diff --git a/python/GafferUI/VectorDataWidget.py b/python/GafferUI/VectorDataWidget.py index b147b0e396a..50b30041c99 100644 --- a/python/GafferUI/VectorDataWidget.py +++ b/python/GafferUI/VectorDataWidget.py @@ -918,7 +918,7 @@ def setData( self, index, value, role ) : # The _DataAccessor classes are responsible for converting from the Cortex data representation to the # Qt (QVariant) representation. -class _DataAccessor() : +class _DataAccessor( object ) : def __init__( self, data ) : diff --git a/python/GafferUI/_Variant.py b/python/GafferUI/_Variant.py index 4cf4a5883c3..c7acea06282 100644 --- a/python/GafferUI/_Variant.py +++ b/python/GafferUI/_Variant.py @@ -44,7 +44,7 @@ # the standard python types, whereas PyQt binds and uses the QVariant type. # This class provides functions to help with writing code which works # with either set of bindings. -class _Variant() : +class _Variant( object ) : ## Returns value converted to a form which can be passed to a function # expecting a QVariant. diff --git a/startup/GafferImage/imageWriterCompatibility.py b/startup/GafferImage/imageWriterCompatibility.py index 0fedd84dd4c..d26aa0d8b54 100644 --- a/startup/GafferImage/imageWriterCompatibility.py +++ b/startup/GafferImage/imageWriterCompatibility.py @@ -37,7 +37,7 @@ import GafferImage -class __MultiSetPlug : +class __MultiSetPlug( object ) : def __init__( self, plugs ) : self._plugs = plugs