From 9d7731887381ff1f100d2837c16af2d1ade11f1f Mon Sep 17 00:00:00 2001 From: Omkar Khatavkar Date: Wed, 22 May 2024 15:51:07 +0530 Subject: [PATCH] fixing make-docs issue with some update in code (#1391) (cherry picked from commit cecb4dafaa1933214473d1d0bfc21d9370505e33) --- airgun/entities/subscription.py | 6 +++--- airgun/helpers/base.py | 15 +++------------ airgun/widgets.py | 5 +++-- 3 files changed, 9 insertions(+), 17 deletions(-) diff --git a/airgun/entities/subscription.py b/airgun/entities/subscription.py index 20b8e812c..d917b9c9b 100644 --- a/airgun/entities/subscription.py +++ b/airgun/entities/subscription.py @@ -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') diff --git a/airgun/helpers/base.py b/airgun/helpers/base.py index e3ce6a73f..8446ec465 100644 --- a/airgun/helpers/base.py +++ b/airgun/helpers/base.py @@ -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. @@ -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) diff --git a/airgun/widgets.py b/airgun/widgets.py index fa408ec39..2c832f5ce 100644 --- a/airgun/widgets.py +++ b/airgun/widgets.py @@ -2546,8 +2546,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)))