summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/build/lib/highlight.py4
-rw-r--r--doc/build/lib/toc.py2
-rw-r--r--doc/build/read_markdown.py2
3 files changed, 4 insertions, 4 deletions
diff --git a/doc/build/lib/highlight.py b/doc/build/lib/highlight.py
index 1a838408b..2fff3704e 100644
--- a/doc/build/lib/highlight.py
+++ b/doc/build/lib/highlight.py
@@ -170,7 +170,7 @@ class PythonHighlighter(Highlighter):
curc = t[2][1]
if self.get_style(t[0], t[1]) != curstyle:
- if len(tokens):
+ if tokens:
self.colorize([(string.join(tokens, ''), curstyle)])
tokens = []
curstyle = self.get_style(t[0], t[1])
@@ -187,7 +187,7 @@ class PythonHighlighter(Highlighter):
curl = t[3][0]
# any remaining content to output, output it
- if len(tokens):
+ if tokens:
self.colorize([(string.join(tokens, ''), curstyle)])
if trailingspace:
diff --git a/doc/build/lib/toc.py b/doc/build/lib/toc.py
index dcad5d5c6..b62951345 100644
--- a/doc/build/lib/toc.py
+++ b/doc/build/lib/toc.py
@@ -44,7 +44,7 @@ class TOCElement(object):
self.next = None
self.children = []
if parent:
- if len(parent.children):
+ if parent.children:
self.previous = parent.children[-1]
parent.children[-1].next = self
parent.children.append(self)
diff --git a/doc/build/read_markdown.py b/doc/build/read_markdown.py
index 858283bde..aad2502d7 100644
--- a/doc/build/read_markdown.py
+++ b/doc/build/read_markdown.py
@@ -25,7 +25,7 @@ def dump_tree(elem, stream):
dump_mako_tag(elem, stream)
else:
if elem.tag != 'html':
- if len(elem.attrib):
+ if elem.attrib:
stream.write("<%s %s>" % (elem.tag, " ".join(["%s=%s" % (key, repr(val)) for key, val in elem.attrib.iteritems()])))
else:
stream.write("<%s>" % elem.tag)