From fd0c256328de3d24dd2201bfc369c66b65a6c3d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Primo=C5=BE=20Godec?= Date: Thu, 20 Jun 2019 10:48:32 +0200 Subject: [PATCH] Code cleanup --- orangecontrib/text/widgets/owpubmed.py | 39 +++++++++++++------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/orangecontrib/text/widgets/owpubmed.py b/orangecontrib/text/widgets/owpubmed.py index 80c5a837a..14f8ec78e 100644 --- a/orangecontrib/text/widgets/owpubmed.py +++ b/orangecontrib/text/widgets/owpubmed.py @@ -242,18 +242,18 @@ def __init__(self): # RECORD RETRIEVAL # Text includes box. - text_includes_box = gui.widgetBox(self.controlArea, - 'Text includes', addSpace=True) - self.authors_checkbox = gui.checkBox(text_includes_box, self, - 'includes_authors', 'Authors') - self.title_checkbox = gui.checkBox(text_includes_box, self, - 'includes_title', 'Article title') - self.mesh_checkbox = gui.checkBox(text_includes_box, self, - 'includes_mesh', 'Mesh headings') - self.abstract_checkbox = gui.checkBox(text_includes_box, self, - 'includes_abstract', 'Abstract') - self.url_checkbox = gui.checkBox(text_includes_box, self, - 'includes_url', 'URL') + text_includes_box = gui.widgetBox( + self.controlArea, 'Text includes', addSpace=True) + self.authors_checkbox = gui.checkBox( + text_includes_box, self, 'includes_authors', 'Authors') + self.title_checkbox = gui.checkBox( + text_includes_box, self, 'includes_title', 'Article title') + self.mesh_checkbox = gui.checkBox( + text_includes_box, self, 'includes_mesh', 'Mesh headings') + self.abstract_checkbox = gui.checkBox( + text_includes_box, self, 'includes_abstract', 'Abstract') + self.url_checkbox = gui.checkBox( + text_includes_box, self, 'includes_url', 'URL') self.pubmed_controls.append(self.authors_checkbox) self.pubmed_controls.append(self.title_checkbox) self.pubmed_controls.append(self.mesh_checkbox) @@ -485,18 +485,18 @@ def send_report(self): ('Query', terms if terms else None), ('Authors', authors if authors else None), ('Date', 'from {} to {}'.format(self.pub_date_from, - self.pub_date_to)), - ('Number of records retrieved', '{}/{}'.format(len( - self.output_corpus) if self.output_corpus else 0, - max_records_count)) + self.pub_date_to)), + ('Number of records retrieved', '{}/{}'.format( + len(self.output_corpus) if self.output_corpus else 0, + max_records_count)) )) else: query = self.advanced_query_input.toPlainText() self.report_items(( ('Query', query if query else None), - ('Number of records retrieved', '{}/{}'.format(len( - self.output_corpus) if self.output_corpus else 0, - max_records_count)) + ('Number of records retrieved', '{}/{}'.format( + len(self.output_corpus) if self.output_corpus else 0, + max_records_count)) )) @@ -529,6 +529,7 @@ def __init__(self, parent, windowTitle='Date picker'): def set_date(self, date): self.picked_date = date.toString('yyyy/MM/dd') + if __name__ == '__main__': app = QApplication([]) widget = OWPubmed()