Anonymous avatar Anonymous committed 088b413

vert old-style classes in bin/* scripts to new-style classes.

Comments (0)

Files changed (9)

     def __init__(self, msg):
         self.msg = msg
 
-class CommandRunner:
+class CommandRunner(object):
     """
     Representation of a command to be executed.
     """
 class ConstructionVariable(Item):
     pass
 
-class Chunk:
+class Chunk(object):
     def __init__(self, tag, body=None):
         self.tag = tag
         if not body:
     def append(self, data):
         self.body.append(data)
 
-class Arguments:
+class Arguments(object):
     def __init__(self, signature, body=None):
         if not body:
             body = []
     def append(self, data):
         self.body.append(data)
 
-class Summary:
+class Summary(object):
     def __init__(self):
         self.body = []
         self.collect = []

bin/caller-tree.py

 
 import sys
 
-class Entry:
+class Entry(object):
     def __init__(self, file_line_func):
         self.file_line_func = file_line_func
         self.called_by = []

bin/import-test.py

 Top = None
 TopPath = None
 
-class Dir:
+class Dir(object):
     def __init__(self, path):
         self.path = path
         self.entries = {}
 sgmllib.entityref = re.compile('&([a-zA-Z][-_.a-zA-Z0-9]*)[^-_a-zA-Z0-9]')
 
 # Classes for collecting different types of data we're interested in.
-class DataCollector:
+class DataCollector(object):
     """Generic class for collecting data between a start tag and end
     tag.  We subclass for various types of tags we care about."""
     def __init__(self):
     return [str(x).replace(os.sep, Sep) for x in orig_RDirs(self, pathlist)]
 SCons.Node.FS.File.RDirs = my_RDirs
 
-class Curry:
+class Curry(object):
     def __init__(self, fun, *args, **kwargs):
         self.fun = fun
         self.pending = args[:]
         result.append(' '.join(map(str, cmd)))
     return '\\n'.join(result)
 
-class ToolSurrogate:
+class ToolSurrogate(object):
     def __init__(self, tool, variable, func, varlist):
         self.tool = tool
         if not isinstance(variable, list):

bin/scons-proc.py

 -->
 """
 
-class SCons_XML:
+class SCons_XML(object):
     def __init__(self, entries, **kw):
         self.values = entries
         for k, v in kw.items():
         body = re.compile(r'\\f([BI])-', re.M).sub(r'\\f\1\-', body)
         f.write(body)
 
-class Proxy:
+class Proxy(object):
     def __init__(self, subject):
         """Wrap an object as a Proxy object"""
         self.__subject = subject

bin/sconsexamples.py

 # Override it with our own regular expression that adds underscore.
 sgmllib.entityref = re.compile('&([a-zA-Z][-_.a-zA-Z0-9]*)[^-_a-zA-Z0-9]')
 
-class DataCollector:
+class DataCollector(object):
     """Generic class for collecting data between a start tag and end
     tag.  We subclass for various types of tags we care about."""
     def __init__(self):
 
 platform = '%s'
 
-class Curry:
+class Curry(object):
     def __init__(self, fun, *args, **kwargs):
         self.fun = fun
         self.pending = args[:]
         result.append(" ".join(map(str, cmd)))
     return '\\n'.join(result)
 
-class ToolSurrogate:
+class ToolSurrogate(object):
     def __init__(self, tool, variable, func):
         self.tool = tool
         self.variable = variable
     'Christoph Wiedemann'       : 'wiedeman',
 }
 
-class Artifact:
+class Artifact(object):
     """Just a place to hold attributes that we find in the XML."""
     pass
 

bin/time-scons.py

 TimeSCons_pieces = ['QMTest', 'timings', 'runtest.py']
 
 
-class CommandRunner:
+class CommandRunner(object):
     """
     Executor class for commands, including "commands" implemented by
     Python functions.
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.