diff options
author | Adrien Di Mascio <Adrien.DiMascio@logilab.fr> | 2009-07-27 10:20:26 +0200 |
---|---|---|
committer | Adrien Di Mascio <Adrien.DiMascio@logilab.fr> | 2009-07-27 10:20:26 +0200 |
commit | fd15c8efa8b1344aa05ef4531e65df698b1b8679 (patch) | |
tree | bc164ed6566acf42e52e188f2542f2525a275db8 /ureports/__init__.py | |
parent | 3e5c562599e14ba1d8af5a69ddb69f1a590ba374 (diff) | |
download | logilab-common-fd15c8efa8b1344aa05ef4531e65df698b1b8679.tar.gz |
[cleanup] delete-trailing-whitespaces
Diffstat (limited to 'ureports/__init__.py')
-rw-r--r-- | ureports/__init__.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ureports/__init__.py b/ureports/__init__.py index 210ec60..f58707b 100644 --- a/ureports/__init__.py +++ b/ureports/__init__.py @@ -33,14 +33,14 @@ def get_nodes(node, klass): # recurse (FIXME: recursion controled by an option) for grandchild in get_nodes(child, klass): yield grandchild - + def layout_title(layout): """try to return the layout's title as string, return None if not found """ for child in layout.children: if isinstance(child, Title): return ' '.join([node.data for node in get_nodes(child, Text)]) - + def build_summary(layout, level=1): """make a summary for the report, including X level""" assert level > 0 @@ -70,7 +70,7 @@ def build_summary(layout, level=1): class BaseWriter(object): """base class for ureport writers""" - + def format(self, layout, stream=None, encoding=None): """format and write the given layout into the stream object @@ -88,7 +88,7 @@ class BaseWriter(object): self.begin_format(layout) layout.accept(self) self.end_format(layout) - + def format_children(self, layout): """recurse on the layout children and call their accept method (see the Visitor pattern) @@ -110,7 +110,7 @@ class BaseWriter(object): def begin_format(self, layout): """begin to format a layout""" self.section = 0 - + def end_format(self, layout): """finished to format a layout""" |