diff options
author | Nicola Spanti <nicola.spanti@logilab.fr> | 2019-12-19 14:45:32 +0100 |
---|---|---|
committer | Nicola Spanti <nicola.spanti@logilab.fr> | 2019-12-19 14:45:32 +0100 |
commit | edafcaf18af5d3c86959c768f2b9bcb4578f5723 (patch) | |
tree | 86c803329be46f11afd33028009eaf1dd616a428 /logilab/common/ureports/__init__.py | |
parent | 20c7f941f3761a742e5fe65ae13639c20e2d428f (diff) | |
download | logilab-common-edafcaf18af5d3c86959c768f2b9bcb4578f5723.tar.gz |
[py] Make flake8 less angry with logilab/common/ureports/
Diffstat (limited to 'logilab/common/ureports/__init__.py')
-rw-r--r-- | logilab/common/ureports/__init__.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/logilab/common/ureports/__init__.py b/logilab/common/ureports/__init__.py index d76ebe5..8ce68a0 100644 --- a/logilab/common/ureports/__init__.py +++ b/logilab/common/ureports/__init__.py @@ -3,18 +3,18 @@ # # This file is part of logilab-common. # -# logilab-common is free software: you can redistribute it and/or modify it under -# the terms of the GNU Lesser General Public License as published by the Free -# Software Foundation, either version 2.1 of the License, or (at your option) any -# later version. +# logilab-common is free software: you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by the +# Free Software Foundation, either version 2.1 of the License, +# or (at your option) any later version. # # logilab-common is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # -# You should have received a copy of the GNU Lesser General Public License along -# with logilab-common. If not, see <http://www.gnu.org/licenses/>. +# You should have received a copy of the GNU Lesser General Public License +# along with logilab-common. If not, see <http://www.gnu.org/licenses/>. """Universal report objects and some formatting drivers. A way to create simple reports using python objects, primarily designed to be @@ -37,6 +37,7 @@ def get_nodes(node, klass): 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 """ @@ -44,6 +45,7 @@ def layout_title(layout): if isinstance(child, Title): return u' '.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 |