Skip to content

Commit

Permalink
Fix linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
aristizabal95 committed Jul 3, 2024
1 parent c676476 commit 34d5a6a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion scripts/monitor/rano_monitor/dataset_browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class DatasetBrowser(App):
Binding("y", "respond('y')", "Yes", show=False),
Binding("n", "respond('n')", "No", show=False),
]
AUTO_FOCUS = '' # Don't focus automatically to search bar
AUTO_FOCUS = "" # Don't focus automatically to search bar

subjects = var([])
report = reactive({})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@


class AnnotationsLoaded(Message):
pass
pass
14 changes: 6 additions & 8 deletions scripts/monitor/rano_monitor/widgets/subject_list_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@ def on_report_updated(self, message: ReportUpdated) -> None:
if len(self.report) > 0:
self.update_list()

def on_invalid_subjects_updated(
self,
message: InvalidSubjectsUpdated
) -> None:
def on_invalid_subjects_updated(self, message: InvalidSubjectsUpdated) -> None:
self.invalid_subjects = message.invalid_subjects
self.update_list()

Expand Down Expand Up @@ -74,14 +71,15 @@ def update_list(self, search_term=""):

should_display = True
if search_term != "":
should_display = subject == "SUMMARY" or \
search_term.lower() in subject.lower() or \
search_term.lower() in status.lower()
should_display = (
subject == "SUMMARY"
or search_term.lower() in subject.lower()
or search_term.lower() in status.lower()
)

if not should_display:
continue
widgets.append(widget)


current_idx = self.index
while len(self.children):
Expand Down
7 changes: 4 additions & 3 deletions scripts/monitor/rano_monitor/widgets/summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def compose(self) -> ComposeResult:
yield Static(
"HINT: To move forward with finalized annotations, ensure the preparation pipeline is running.",
id="hint-msg",
classes="warning"
classes="warning",
)
yield Center(id="summary-content")
with Center(id="package-btns"):
Expand Down Expand Up @@ -73,7 +73,9 @@ def update_summary(self):
widgets = []
for name, val in status_percents.items():
count = status_counts[name] if name in status_counts else 0
wname = Label(f'{name.capitalize().replace("_", " ")} ({count}/{len(report_df)})')
wname = Label(
f'{name.capitalize().replace("_", " ")} ({count}/{len(report_df)})'
)
wpbar = ProgressBar(total=1, show_eta=False)
wpbar.advance(val)
widget = Center(wname, wpbar, classes="pbar")
Expand Down Expand Up @@ -122,4 +124,3 @@ async def on_button_pressed(self, event: Button.Pressed) -> None:
return

self.run_worker(self._unpackage_reviews(), exclusive=True, thread=True)

0 comments on commit 34d5a6a

Please sign in to comment.