From 1cbe0af6e58979298f72ea38c6fc6276531fd9da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Gajdu=C5=A1ek?= Date: Tue, 21 May 2024 16:43:36 +0200 Subject: [PATCH] [6.15.z] Bump sphinx-autoapi from 3.0.0 to 3.1.0 (#15124) Bump sphinx-autoapi from 3.0.0 to 3.1.0 (#15114) (cherry picked from commit 7702a84cf0d820dd245cb8c01619731ae5bb99ff) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pytest_fixtures/component/repository.py | 2 +- requirements-optional.txt | 4 ++-- robottelo/cli/base.py | 2 +- robottelo/host_helpers/api_factory.py | 2 +- robottelo/host_helpers/repository_mixins.py | 4 ++-- robottelo/host_helpers/satellite_mixins.py | 6 +++--- robottelo/hosts.py | 6 +++--- robottelo/utils/datafactory.py | 2 +- robottelo/utils/report_portal/portal.py | 8 ++------ tests/foreman/api/test_notifications.py | 2 +- tests/foreman/api/test_permission.py | 4 ++-- tests/foreman/cli/test_oscap.py | 2 +- tests/foreman/longrun/test_oscap.py | 2 +- 13 files changed, 21 insertions(+), 25 deletions(-) diff --git a/pytest_fixtures/component/repository.py b/pytest_fixtures/component/repository.py index 15614433f9f..2ec3785db4c 100644 --- a/pytest_fixtures/component/repository.py +++ b/pytest_fixtures/component/repository.py @@ -132,7 +132,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 d0591770888..7488faf1ead 100644 --- a/robottelo/host_helpers/api_factory.py +++ b/robottelo/host_helpers/api_factory.py @@ -168,7 +168,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 a55bc53ff85..a620f80f49e 100644 --- a/robottelo/host_helpers/repository_mixins.py +++ b/robottelo/host_helpers/repository_mixins.py @@ -588,7 +588,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') @@ -605,7 +605,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 58fe5b5d237..60083dc0b7c 100644 --- a/robottelo/host_helpers/satellite_mixins.py +++ b/robottelo/host_helpers/satellite_mixins.py @@ -142,7 +142,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 ( @@ -176,7 +176,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 @@ -187,7 +187,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 e5778b57c0b..e63945899aa 100644 --- a/robottelo/hosts.py +++ b/robottelo/hosts.py @@ -341,7 +341,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']) @@ -474,7 +474,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 @@ -1483,7 +1483,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_notifications.py b/tests/foreman/api/test_notifications.py index 506a7983c16..41e86100fd0 100644 --- a/tests/foreman/api/test_notifications.py +++ b/tests/foreman/api/test_notifications.py @@ -197,7 +197,7 @@ def wait_for_no_long_running_task_mail(target_sat, clean_root_mailbox, long_runn def root_mailbox_copy(target_sat, clean_root_mailbox): """Parsed local system copy of the Satellite's root user mailbox. - :returns: :class:`mailbox.mbox` instance + :return: :class:`mailbox.mbox` instance """ result = target_sat.execute(f'cat {clean_root_mailbox}') assert result.status == 0, f'Could not read mailbox {clean_root_mailbox} on Satellite host.' diff --git a/tests/foreman/api/test_permission.py b/tests/foreman/api/test_permission.py index ffce04988c5..2f9939d84bf 100644 --- a/tests/foreman/api/test_permission.py +++ b/tests/foreman/api/test_permission.py @@ -182,7 +182,7 @@ def _permission_names(entity, which_perm: str) -> list: :param str which_perm: Either the word "create", "read", "update" or "delete". :raise: ``LookupError`` if a relevant permission cannot be found - :returns: list of found permission names + :return: list of found permission names """ pattern = {'create': '^create_', 'delete': '^destroy_', 'read': '^view_', 'update': '^edit_'}[ which_perm @@ -227,7 +227,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 ea0f15318a1..248f4d4ee3f 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 aaaa127a098..28908482e82 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')