summaryrefslogtreecommitdiff
path: root/bin/SConsDoc.py
diff options
context:
space:
mode:
authorLuca Falavigna <dktrkranz@debian.org>2010-06-15 14:28:28 +0000
committerLuca Falavigna <dktrkranz@debian.org>2010-06-15 14:28:28 +0000
commit0ed55e71a9f4b9cda836c6a4a5408cece60db0c6 (patch)
treeb1e82f6e428ac15ed9b4de93e48d8079420d537d /bin/SConsDoc.py
parentfe00e4f75ba00298c30d6854b245c2a42c6542b8 (diff)
parent738149c9bfb9965d013d01ef99f9bb1c2819e7e8 (diff)
Merge commit 'upstream/2.0.0'
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.