diff options
author | Sebastian Koslowski <koslowski@kit.edu> | 2016-04-19 17:16:48 +0200 |
---|---|---|
committer | Sebastian Koslowski <koslowski@kit.edu> | 2016-04-19 17:16:48 +0200 |
commit | 240fd75770bc71435630768ea4767d55ce24bf2b (patch) | |
tree | cb7881161aa48b0d1078146b422fdd83ab16f574 /grc/python/Block.py | |
parent | fe6abd5ffb90f97e300a93e26f976b4053247062 (diff) |
grc: add more documentation for embedded python blocks
Diffstat (limited to 'grc/python/Block.py')
-rw-r--r-- | grc/python/Block.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/grc/python/Block.py b/grc/python/Block.py index 4118fda347..8509aa3fc6 100644 --- a/grc/python/Block.py +++ b/grc/python/Block.py @@ -244,6 +244,7 @@ class Block(_Block, _GUIBlock): platform = flowgraph.get_parent() param_blk = self.get_param('_io_cache') param_src = self.get_param('_source_code') + doc_end_tag = 'Block Documentation:' src = param_src.get_value() src_hash = hash(src) @@ -267,7 +268,7 @@ class Block(_Block, _GUIBlock): self._epy_source_hash = src_hash self._name = blk_io.name or blk_io.cls - self._doc = blk_io.doc + self._doc = self._doc.split(doc_end_tag)[0] + doc_end_tag + '\n' + blk_io.doc self._imports[0] = 'from {} import {}'.format(self.get_id(), blk_io.cls) self._make = '{}({})'.format(blk_io.cls, ', '.join( '{0}=${0}'.format(key) for key, _ in blk_io.params)) |