Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
PrimozGodec committed Aug 26, 2019
1 parent 9dc3d07 commit 075761b
Showing 1 changed file with 20 additions and 19 deletions.
39 changes: 20 additions & 19 deletions orangecontrib/text/widgets/owpubmed.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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))
))


Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 075761b

Please sign in to comment.