diff options
author | Mats Wichmann <mats@linux.com> | 2020-05-23 13:46:18 (GMT) |
---|---|---|
committer | Mats Wichmann <mats@linux.com> | 2020-05-24 15:27:22 (GMT) |
commit | 5b288f1b67a85bcccc533f101311b1c2c7f2b6eb (patch) | |
tree | adca21d96e435443cbc90985f53f67b85530a6c2 /bin | |
parent | 0e76754e652e974f82f975d2cf526d5f7705baab (diff) | |
download | SCons-5b288f1b67a85bcccc533f101311b1c2c7f2b6eb.zip SCons-5b288f1b67a85bcccc533f101311b1c2c7f2b6eb.tar.gz SCons-5b288f1b67a85bcccc533f101311b1c2c7f2b6eb.tar.bz2 |
classes no longer explicitly inherit from object
In Python3 this is the default.
Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'bin')
-rw-r--r-- | bin/Command.py | 2 | ||||
-rw-r--r-- | bin/SConsDoc.py | 12 | ||||
-rw-r--r-- | bin/SConsExamples.py | 4 | ||||
-rw-r--r-- | bin/caller-tree.py | 2 | ||||
-rw-r--r-- | bin/import-test.py | 2 | ||||
-rw-r--r-- | bin/linecount.py | 2 | ||||
-rw-r--r-- | bin/scons-proc.py | 2 | ||||
-rw-r--r-- | bin/scons-time.py | 6 | ||||
-rw-r--r-- | bin/time-scons.py | 2 | ||||
-rw-r--r-- | bin/update-release-info.py | 4 |
10 files changed, 19 insertions, 19 deletions
diff --git a/bin/Command.py b/bin/Command.py index a63e6c5..a7f94f6 100644 --- a/bin/Command.py +++ b/bin/Command.py @@ -13,7 +13,7 @@ class Usage(Exception): def __init__(self, msg): self.msg = msg -class CommandRunner(object): +class CommandRunner: """ Representation of a command to be executed. """ diff --git a/bin/SConsDoc.py b/bin/SConsDoc.py index 960a0c9..958fb4c 100644 --- a/bin/SConsDoc.py +++ b/bin/SConsDoc.py @@ -251,7 +251,7 @@ class DoctypeDeclaration: return content if not has_libxml2: - class TreeFactory(object): + class TreeFactory: def __init__(self): pass @@ -391,7 +391,7 @@ if not has_libxml2: return [root] else: - class TreeFactory(object): + class TreeFactory: def __init__(self): pass @@ -622,7 +622,7 @@ else: tf = TreeFactory() -class SConsDocTree(object): +class SConsDocTree: def __init__(self): self.nsmap = {'dbx': dbxsd} self.doc = None @@ -707,7 +707,7 @@ def validate_all_xml(dpaths, xsdfile=default_xsd): return True -class Item(object): +class Item: def __init__(self, name): self.name = name self.sort_name = name.lower() @@ -745,7 +745,7 @@ class ConstructionVariable(Item): pass -class Arguments(object): +class Arguments: def __init__(self, signature, body=None): if not body: body = [] @@ -763,7 +763,7 @@ class Arguments(object): self.body.append(data) -class SConsDocHandler(object): +class SConsDocHandler: def __init__(self): self.builders = {} self.functions = {} diff --git a/bin/SConsExamples.py b/bin/SConsExamples.py index 6223002..46df103 100644 --- a/bin/SConsExamples.py +++ b/bin/SConsExamples.py @@ -477,7 +477,7 @@ def my_RDirs(self, pathlist, orig_RDirs=orig_RDirs): return [str(x).replace(os.sep, Sep) for x in orig_RDirs(self, pathlist)] SCons.Node.FS.File.RDirs = my_RDirs -class Curry(object): +class Curry: def __init__(self, fun, *args, **kwargs): self.fun = fun self.pending = args[:] @@ -498,7 +498,7 @@ def Str(target, source, env, cmd=""): result.append(' '.join(map(str, cmd))) return '\\n'.join(result) -class ToolSurrogate(object): +class ToolSurrogate: def __init__(self, tool, variable, func, varlist): self.tool = tool if not isinstance(variable, list): diff --git a/bin/caller-tree.py b/bin/caller-tree.py index 184ae30..b2eab28 100644 --- a/bin/caller-tree.py +++ b/bin/caller-tree.py @@ -41,7 +41,7 @@ # fine-grained performance tuning. import sys -class Entry(object): +class Entry: def __init__(self, file_line_func): self.file_line_func = file_line_func self.called_by = [] diff --git a/bin/import-test.py b/bin/import-test.py index 6a71a37..d979017 100644 --- a/bin/import-test.py +++ b/bin/import-test.py @@ -35,7 +35,7 @@ directory = sys.argv[1] Top = None TopPath = None -class Dir(object): +class Dir: def __init__(self, path): self.path = path self.entries = {} diff --git a/bin/linecount.py b/bin/linecount.py index 163401b..ae45c55 100644 --- a/bin/linecount.py +++ b/bin/linecount.py @@ -27,7 +27,7 @@ import os.path fmt = "%-16s %5s %7s %9s %11s %11s" -class Collection(object): +class Collection: def __init__(self, name, files=None, pred=None): self._name = name if files is None: diff --git a/bin/scons-proc.py b/bin/scons-proc.py index 9ec4efd..95a798c 100644 --- a/bin/scons-proc.py +++ b/bin/scons-proc.py @@ -222,7 +222,7 @@ class SCons_XML: v.tag, v.entityfunc(), v.tag)) f.close() -class Proxy(object): +class Proxy: def __init__(self, subject): """Wrap an object as a Proxy object""" self.__subject = subject diff --git a/bin/scons-time.py b/bin/scons-time.py index f4decc9..e7087e7 100644 --- a/bin/scons-time.py +++ b/bin/scons-time.py @@ -57,7 +57,7 @@ def HACK_for_exec(cmd, *args): exec(cmd, args[0], args[1]) -class Plotter(object): +class Plotter: def increment_size(self, largest): """ Return the size of each horizontal increment line for a specified @@ -81,7 +81,7 @@ class Plotter(object): return ((largest + increment - 1) // increment) * increment -class Line(object): +class Line: def __init__(self, points, type, title, label, comment, fmt="%s %s"): self.points = points self.type = type @@ -260,7 +260,7 @@ def tee_to_file(command, log): return '%s 2>&1 | tee %s' % (command, log) -class SConsTimer(object): +class SConsTimer: """ Usage: scons-time SUBCOMMAND [ARGUMENTS] Type "scons-time help SUBCOMMAND" for help on a specific subcommand. diff --git a/bin/time-scons.py b/bin/time-scons.py index c5cd0cc..272283a 100644 --- a/bin/time-scons.py +++ b/bin/time-scons.py @@ -46,7 +46,7 @@ TimeSCons_revision = 4569 TimeSCons_pieces = ['testing/framework', 'timings', 'runtest.py'] -class CommandRunner(object): +class CommandRunner: """ Executor class for commands, including "commands" implemented by Python functions. diff --git a/bin/update-release-info.py b/bin/update-release-info.py index 3fcdf72..fabf7c6 100644 --- a/bin/update-release-info.py +++ b/bin/update-release-info.py @@ -67,7 +67,7 @@ import argparse DEBUG = os.environ.get('DEBUG', 0) -class ReleaseInfo(object): +class ReleaseInfo: def __init__(self, args): self.config = {} self.args = args @@ -181,7 +181,7 @@ class ReleaseInfo(object): + ' %+.4d' % min) -class UpdateFile(object): +class UpdateFile: """ XXX """ rel_info = None |