diff --git a/pytest_fixtures/component/repository.py b/pytest_fixtures/component/repository.py index b7a26560980..e4a28883838 100644 --- a/pytest_fixtures/component/repository.py +++ b/pytest_fixtures/component/repository.py @@ -131,7 +131,7 @@ class constructor arguments. It can create multiple repos with distro. ] Then the fixtures loop over it to create multiple repositories. - :returns: The tuple of distro of repositories(if given) and simplified repos + :return: The tuple of distro of repositories(if given) and simplified repos """ _repos = [] repo_distro = None diff --git a/requirements-optional.txt b/requirements-optional.txt index 25cfc489cdf..7684169a550 100644 --- a/requirements-optional.txt +++ b/requirements-optional.txt @@ -5,8 +5,8 @@ redis==5.0.4 pre-commit==3.7.1 # For generating documentation. -sphinx==7.3.6 -sphinx-autoapi==3.0.0 +sphinx==7.3.7 +sphinx-autoapi==3.1.0 # For 'manage' interactive shell manage==0.1.15 diff --git a/robottelo/cli/base.py b/robottelo/cli/base.py index 2827fdba5e5..c30231a4ea1 100644 --- a/robottelo/cli/base.py +++ b/robottelo/cli/base.py @@ -36,7 +36,7 @@ def _handle_response(cls, response, ignore_stderr=None): :param response: a result object, returned by :mod:`robottelo.utils.ssh.command`. :param ignore_stderr: indicates whether to throw a warning in logs if ``stderr`` is not empty. - :returns: contents of ``stdout``. + :return: contents of ``stdout``. :raises robottelo.exceptions.CLIReturnCodeError: If return code is different from zero. """ diff --git a/robottelo/host_helpers/api_factory.py b/robottelo/host_helpers/api_factory.py index b1a839559b1..23dd0a8856f 100644 --- a/robottelo/host_helpers/api_factory.py +++ b/robottelo/host_helpers/api_factory.py @@ -167,7 +167,7 @@ def one_to_one_names(self, name): True :param name: A field name. - :returns: A set including both ``name`` and variations on ``name``. + :return: A set including both ``name`` and variations on ``name``. """ return {f'{name}_name', f'{name}_id'} diff --git a/robottelo/host_helpers/repository_mixins.py b/robottelo/host_helpers/repository_mixins.py index ede06f5d232..1ea2a31d8c7 100644 --- a/robottelo/host_helpers/repository_mixins.py +++ b/robottelo/host_helpers/repository_mixins.py @@ -582,7 +582,7 @@ def add_item(self, item) -> None: Add repository to collection :param BaseRepository item: Item to add - :returns: None + :return: None """ if self._repos_info: raise RepositoryAlreadyCreated('Repositories already created can not add more') @@ -599,7 +599,7 @@ def add_items(self, items): Add multiple repositories to collection :param List[BaseRepository] items: Items to add - :returns: None + :return: None """ for item in items: self.add_item(item) diff --git a/robottelo/host_helpers/satellite_mixins.py b/robottelo/host_helpers/satellite_mixins.py index 25eceeda788..0cabcd97858 100644 --- a/robottelo/host_helpers/satellite_mixins.py +++ b/robottelo/host_helpers/satellite_mixins.py @@ -141,7 +141,7 @@ def upload_manifest(self, org_id, manifest=None, interface='API', timeout=None): :type interface: str :type timeout: int - :returns: the manifest upload result + :return: the manifest upload result """ if not isinstance(manifest, bytes | io.BytesIO) and ( @@ -175,7 +175,7 @@ def is_sca_mode_enabled(self, org_id): given organization. :param str org_id: The unique identifier of the organization to check for SCA mode. - :returns: A boolean value indicating whether SCA mode is enabled or not. + :return: A boolean value indicating whether SCA mode is enabled or not. :rtype: bool """ return self.api.Organization(id=org_id).read().simple_content_access @@ -186,7 +186,7 @@ def publish_content_view(self, org, repo_list): :param str org: The name of the organization to which the content view belongs :param list or str repo_list: A list of repositories or a single repository - :returns: A dictionary containing the details of the published content view. + :return: A dictionary containing the details of the published content view. """ repo = repo_list if isinstance(repo_list, list) else [repo_list] content_view = self.api.ContentView(organization=org, repository=repo).create() diff --git a/robottelo/hosts.py b/robottelo/hosts.py index 17c084eaa01..640ead803d4 100644 --- a/robottelo/hosts.py +++ b/robottelo/hosts.py @@ -309,7 +309,7 @@ def os_distro(self): def os_version(self): """Get host's OS version information - :returns: A ``packaging.version.Version`` instance + :return: A ``packaging.version.Version`` instance """ return Version(self._os_release['VERSION_ID']) @@ -439,7 +439,7 @@ def download_file(self, file_url, local_path=None, file_name=None): provided file will be saved in /tmp/ directory. :param str file_name: New name of the Downloaded file else its given from file_url - :returns: Returns list containing complete file path and name of downloaded file. + :return: Returns list containing complete file path and name of downloaded file. """ file_name = PurePath(file_name or file_url).name local_path = PurePath(local_path or '/tmp') / file_name @@ -1459,7 +1459,7 @@ def ping_host(self, host): """Check the provisioned host status by pinging the ip of host :param host: IP address or hostname of the provisioned host - :returns: None + :return: None :raises: : `HostPingFailed` if the host is not pingable """ result = self.execute( diff --git a/robottelo/utils/datafactory.py b/robottelo/utils/datafactory.py index 6f571986a56..8a5677b38df 100644 --- a/robottelo/utils/datafactory.py +++ b/robottelo/utils/datafactory.py @@ -82,7 +82,7 @@ def generate_strings_list(length=None, exclude_types=None, min_length=3, max_len generated list. example: exclude_types=['html', 'cjk'] :param int min_length: Minimum length to be used in integer generator :param int max_length: Maximum length to be used in integer generator - :returns: A list of various string types. + :return: A list of various string types. """ if length is None: diff --git a/robottelo/utils/report_portal/portal.py b/robottelo/utils/report_portal/portal.py index c7e0df5d54e..b3b32cbd7e8 100644 --- a/robottelo/utils/report_portal/portal.py +++ b/robottelo/utils/report_portal/portal.py @@ -43,16 +43,12 @@ def __init__(self, rp_url=None, rp_api_key=None, rp_project=None): @property def api_url(self): - """Super url of report portal - :returns: Base url for API request - """ + """Super url of report portal API.""" return f'{self.rp_url}/api/v1/{self.rp_project}' @property def headers(self): - """The headers for Report Portal Requests. - :returns: header for API request - """ + """The headers for Report Portal Requests.""" return {'Authorization': f'Bearer {self.rp_api_key}'} def get_launches( diff --git a/tests/foreman/api/test_permission.py b/tests/foreman/api/test_permission.py index 25bf17cf8a2..88e575b8cdf 100644 --- a/tests/foreman/api/test_permission.py +++ b/tests/foreman/api/test_permission.py @@ -218,7 +218,7 @@ def give_user_permission(self, perm_name, target_sat): searching for the permission with name ``perm_name``. :raises: ``requests.exceptions.HTTPError`` if an error occurs when updating ``self.user``'s roles. - :returns: Nothing. + :return: Nothing. """ role = target_sat.api.Role().create() permissions = target_sat.api.Permission().search(query={'search': f'name="{perm_name}"'}) diff --git a/tests/foreman/cli/test_oscap.py b/tests/foreman/cli/test_oscap.py index 467be5053ed..9567685c222 100644 --- a/tests/foreman/cli/test_oscap.py +++ b/tests/foreman/cli/test_oscap.py @@ -35,7 +35,7 @@ def fetch_scap_and_profile_id(cls, scap_name, sat): :param scap_name: Scap title - :returns: scap_id and scap_profile_id + :return: scap_id and scap_profile_id """ default_content = sat.cli.Scapcontent.info({'title': scap_name}, output_format='json') scap_id = default_content['id'] diff --git a/tests/foreman/longrun/test_oscap.py b/tests/foreman/longrun/test_oscap.py index e40328ef606..ae070b77186 100644 --- a/tests/foreman/longrun/test_oscap.py +++ b/tests/foreman/longrun/test_oscap.py @@ -43,7 +43,7 @@ def fetch_scap_and_profile_id(sat, scap_name, scap_profile): :param scap_name: Scap title :param scap_profile: Scap profile you want to select - :returns: scap_id and scap_profile_id + :return: scap_id and scap_profile_id """ default_content = sat.cli.Scapcontent.info({'title': scap_name}, output_format='json')