summaryrefslogtreecommitdiff
path: root/bin/SConsDoc.py
diff options
context:
space:
mode:
Diffstat (limited to 'bin/SConsDoc.py')
-rw-r--r--bin/SConsDoc.py18
1 files changed, 8 insertions, 10 deletions
diff --git a/bin/SConsDoc.py b/bin/SConsDoc.py
index 3f64a25..4927dc0 100644
--- a/bin/SConsDoc.py
+++ b/bin/SConsDoc.py
@@ -146,7 +146,7 @@ class Tool(Item):
class ConstructionVariable(Item):
pass
-class Chunk:
+class Chunk(object):
def __init__(self, tag, body=None):
self.tag = tag
if not body:
@@ -158,7 +158,7 @@ class Chunk:
def append(self, data):
self.body.append(data)
-class Arguments:
+class Arguments(object):
def __init__(self, signature, body=None):
if not body:
body = []
@@ -175,7 +175,7 @@ class Arguments:
def append(self, data):
self.body.append(data)
-class Summary:
+class Summary(object):
def __init__(self):
self.body = []
self.collect = []
@@ -217,9 +217,9 @@ class SConsDocHandler(xml.sax.handler.ContentHandler,
def __init__(self):
self._start_dispatch = {}
self._end_dispatch = {}
- keys = self.__class__.__dict__.keys()
- start_tag_method_names = filter(lambda k: k[:6] == 'start_', keys)
- end_tag_method_names = filter(lambda k: k[:4] == 'end_', keys)
+ keys = list(self.__class__.__dict__.keys())
+ start_tag_method_names = [k for k in keys if k[:6] == 'start_']
+ end_tag_method_names = [k for k in keys if k[:4] == 'end_']
for method_name in start_tag_method_names:
tag = method_name[6:]
self._start_dispatch[tag] = getattr(self, method_name)
@@ -353,15 +353,13 @@ class SConsDocHandler(xml.sax.handler.ContentHandler,
def start_uses(self, attrs):
self.begin_collecting([])
def end_uses(self):
- self.current_object.uses = ''.join(self.collect).split()
- self.current_object.uses.sort()
+ self.current_object.uses = sorted(''.join(self.collect).split())
self.end_collecting()
def start_sets(self, attrs):
self.begin_collecting([])
def end_sets(self):
- self.current_object.sets = ''.join(self.collect).split()
- self.current_object.sets.sort()
+ self.current_object.sets = sorted(''.join(self.collect).split())
self.end_collecting()
# Stuff for the ErrorHandler portion.