Skip to content

Commit

Permalink
Fix ruff issues
Browse files Browse the repository at this point in the history
  • Loading branch information
sambible committed Oct 10, 2023
1 parent ce63985 commit 0c81368
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion airgun/entities/contentview_new.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
9 changes: 3 additions & 6 deletions airgun/views/contentview_new.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

LOCATION_NUM = 3


class NewAddRemoveResourcesView(View):
searchbox = PF4Search()
type = Dropdown(
Expand Down Expand Up @@ -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)

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

Expand Down Expand Up @@ -268,5 +267,3 @@ def is_displayed(self):
and self.breadcrumb.locations[0] == 'Content Views'
and self.breadcrumb.locations[2] == 'Versions'
)


2 changes: 0 additions & 2 deletions airgun/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 0c81368

Please sign in to comment.