def run(self): html_text = self.html_text_no_doc doc = self.doc if doc is not None: if type(doc) is dict and 'docstring' in doc.keys(): try: context = generate_context(name=doc['name'], argspec=doc['argspec'], note=doc['note'], math=self.math_option, img_path=self.img_path) html_text = sphinxify(doc['docstring'], context) if doc['docstring'] == '': if any([doc['name'], doc['argspec'], doc['note']]): msg = _("No further documentation available") html_text += '<div class="hr"></div>' else: msg = _("No documentation available") html_text += '<div id="doc-warning">%s</div>' % msg except Exception as error: self.error_msg.emit(to_text_string(error)) return elif self.context is not None: try: html_text = sphinxify(doc, self.context) except Exception as error: self.error_msg.emit(to_text_string(error)) return self.html_ready.emit(html_text)
def run(self): html_text = self.html_text_no_doc doc = self.doc if doc is not None: if type(doc) is dict and 'docstring' in doc.keys(): try: context = generate_context(name=doc['name'], argspec=doc['argspec'], note=doc['note'], math=self.math_option, img_path=self.img_path) html_text = sphinxify(doc['docstring'], context) if doc['docstring'] == '': html_text += '<div class="hr"></div>' html_text += self.html_text_no_doc except Exception as error: self.error_msg.emit(to_text_string(error)) return elif self.context is not None: try: html_text = sphinxify(doc, self.context) except Exception as error: self.error_msg.emit(to_text_string(error)) return self.html_ready.emit(html_text)
def run(self): html_text = self.html_text_no_doc doc = self.doc if doc is not None: if type(doc) is dict and 'docstring' in doc.keys(): try: context = generate_context(name=doc['name'], argspec=doc['argspec'], note=doc['note'], math=self.math_option, img_path=self.img_path) html_text = sphinxify(doc['docstring'], context) if doc['docstring'] == '' and \ any([doc['name'], doc['argspec'], doc['note']]): msg = _("No further documentation available") html_text += '<div class="hr"></div>' html_text += '<div id="doc-warning">%s</div>' % msg except Exception as error: self.error_msg.emit(to_text_string(error)) return elif self.context is not None: try: html_text = sphinxify(doc, self.context) except Exception as error: self.error_msg.emit(to_text_string(error)) return self.html_ready.emit(html_text)