From 0c813687296be7cd8e17adbbe3492b65a84f6230 Mon Sep 17 00:00:00 2001 From: Sam Bible Date: Tue, 10 Oct 2023 09:12:41 -0500 Subject: [PATCH] Fix ruff issues --- airgun/entities/contentview_new.py | 2 +- airgun/views/contentview_new.py | 9 +++------ airgun/widgets.py | 2 -- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/airgun/entities/contentview_new.py b/airgun/entities/contentview_new.py index 61c3c9dd2..037627159 100644 --- a/airgun/entities/contentview_new.py +++ b/airgun/entities/contentview_new.py @@ -42,7 +42,7 @@ def publish(self, entity_name, values=None): view.fill(values) view.next.click() view.finish.click() - view.progressbar.wait_for_result(delay=.01) + view.progressbar.wait_for_result(delay=0.01) view = self.navigate_to(self, 'Edit', entity_name=entity_name) self.browser.plugin.ensure_page_safe(timeout='5s') view.wait_displayed() diff --git a/airgun/views/contentview_new.py b/airgun/views/contentview_new.py index 4409ada76..e4daf0142 100644 --- a/airgun/views/contentview_new.py +++ b/airgun/views/contentview_new.py @@ -25,6 +25,7 @@ LOCATION_NUM = 3 + class NewAddRemoveResourcesView(View): searchbox = PF4Search() type = Dropdown( @@ -69,7 +70,7 @@ def add(self, value): def fill(self, values): """Associate resource(s)""" if not isinstance(values, list): - values = list((values,)) + values = [values] for value in values: self.add(value) @@ -143,9 +144,7 @@ def after_fill(self, value): class ContentViewEditView(BaseLoggedInView): breadcrumb = BreadCrumb('breadcrumbs-list') search = PF4Search() - actions = ActionsDropdown( - ".//button[contains(@id, 'toggle-dropdown')]" - ) + actions = ActionsDropdown(".//button[contains(@id, 'toggle-dropdown')]") publish = PF4Button('cv-details-publish-button') dialog = ConfirmationDialog() @@ -268,5 +267,3 @@ def is_displayed(self): and self.breadcrumb.locations[0] == 'Content Views' and self.breadcrumb.locations[2] == 'Versions' ) - - diff --git a/airgun/widgets.py b/airgun/widgets.py index 48c96adce..5a4cf5855 100644 --- a/airgun/widgets.py +++ b/airgun/widgets.py @@ -27,7 +27,6 @@ VerticalNavigation, ) from widgetastic_patternfly4.ouia import BaseSelect, Button as PF4Button, Dropdown - from widgetastic_patternfly4.progress import Progress as PF4Progress from airgun.exceptions import DisabledWidgetError, ReadOnlyWidgetError @@ -2033,7 +2032,6 @@ def read(self): class PF4ProgressBar(PF4Progress): - locator = './/div[contains(@class, "pf-c-wizard__main-body")]' def wait_for_result(self, timeout=600, delay=1):