Skip to content

Commit

Permalink
fixing make-docs issue with some update in code (#1391)
Browse files Browse the repository at this point in the history
(cherry picked from commit cecb4da)
  • Loading branch information
omkarkhatavkar authored and web-flow committed May 22, 2024
1 parent 0c59ea8 commit bd892c9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 17 deletions.
6 changes: 3 additions & 3 deletions airgun/entities/subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ def _wait_for_process_to_finish(
@property
def has_manifest(self):
"""Is there manifest present in current organization?
:return: boolean value indicating whether manifest is present
May be None if user can't verify reliably if manifest is
uploaded or not due to missing permissions
:return: boolean value indicating whether manifest is present May be None if user can't verify
reliably if manifest is uploaded or not due to missing permissions
"""
try:
view = self.navigate_to(self, 'Manage Manifest')
Expand Down
15 changes: 3 additions & 12 deletions airgun/helpers/base.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,15 @@
from typing import TYPE_CHECKING

if TYPE_CHECKING:
pass


class BaseEntityHelper:
def __init__(self, entity):
# type: (BaseEntity) -> None
self._entity = entity

@property
def entity(self):
"""Returns the entity associated with this helper."""
return self._entity

def read_filled_view(
self, navigation_name, navigation_kwargs=None, values=None, read_widget_names=None
):
# type: (str, Dict, Dict[str, Any], List[str]) -> Dict[str, Any]
"""Navigate to a form using 'navigation_name' and with parameters from 'navigation_kwargs',
fill the form with values and then read values for widgets from 'read_widget_names' list if
supplied otherwise read all widgets values.
Expand All @@ -32,10 +25,8 @@ def read_filled_view(
)
"""
if navigation_kwargs is None:
navigation_kwargs = {}
if values is None:
values = {}
navigation_kwargs = navigation_kwargs or {}
values = values or {}
view = self.entity.navigate_to(self.entity, name=navigation_name, **navigation_kwargs)
view.fill(values)
return view.read(widget_names=read_widget_names)
5 changes: 3 additions & 2 deletions airgun/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -2370,8 +2370,9 @@ class AuthSourceAggregateCard(AggregateStatusCard):

@property
def count(self):
"""Count of sources
:return int: None if no count element is found, otherwise count of sources in the card
"""Count of sources.
:return int or None: None if no count element is found, otherwise count of sources in the card.
"""
try:
return int(self.browser.text(self.browser.element(self.COUNT)))
Expand Down

0 comments on commit bd892c9

Please sign in to comment.