diff options
author | Josh Morman <jmorman@gnuradio.org> | 2021-11-24 12:43:14 -0500 |
---|---|---|
committer | mormj <34754695+mormj@users.noreply.github.com> | 2021-11-24 14:41:53 -0500 |
commit | e6f61fba108fb40ad8103ef4fadbe507932695ab (patch) | |
tree | 354a7a48dc48f06f448ff842329074a50b3fca5c /gr-utils/modtool/templates/gr-newmod/docs/doxygen/doxyxml/text.py | |
parent | 1bfc6b439dbcdc467bbbed43a9fd71b49524c348 (diff) |
utils: pep8 formatting
Signed-off-by: Josh Morman <jmorman@gnuradio.org>
Diffstat (limited to 'gr-utils/modtool/templates/gr-newmod/docs/doxygen/doxyxml/text.py')
-rw-r--r-- | gr-utils/modtool/templates/gr-newmod/docs/doxygen/doxyxml/text.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gr-utils/modtool/templates/gr-newmod/docs/doxygen/doxyxml/text.py b/gr-utils/modtool/templates/gr-newmod/docs/doxygen/doxyxml/text.py index 8d8c7b4301..dbc7170ab2 100644 --- a/gr-utils/modtool/templates/gr-newmod/docs/doxygen/doxyxml/text.py +++ b/gr-utils/modtool/templates/gr-newmod/docs/doxygen/doxyxml/text.py @@ -11,6 +11,7 @@ Utilities for extracting text from generated classes. """ + def is_string(txt): if isinstance(txt, str): return True @@ -21,11 +22,13 @@ def is_string(txt): pass return False + def description(obj): if obj is None: return None return description_bit(obj).strip() + def description_bit(obj): if hasattr(obj, 'content'): contents = [description_bit(item) for item in obj.content] @@ -38,7 +41,8 @@ def description_bit(obj): elif is_string(obj): return obj else: - raise Exception('Expecting a string or something with content, content_ or value attribute') + raise Exception( + 'Expecting a string or something with content, content_ or value attribute') # If this bit is a paragraph then add one some line breaks. if hasattr(obj, 'name') and obj.name == 'para': result += "\n\n" |