diff options
author | Nejc Habjan <hab.nejc@gmail.com> | 2021-11-24 01:36:48 +0100 |
---|---|---|
committer | Nejc Habjan <hab.nejc@gmail.com> | 2021-11-24 01:36:48 +0100 |
commit | 81a392ca6e9b44444c0f1287139abe788d50119d (patch) | |
tree | 97e0f03be6f8819cb9b8a5dd0d46432ff6dfc5a4 /gitlab/v4/objects/groups.py | |
parent | 7ba5995ed472997e6bf98e8ae58107af307a5615 (diff) | |
download | gitlab-chore/sphinx-annotations.tar.gz |
chore: deduplicate type annotations in docschore/sphinx-annotations
Diffstat (limited to 'gitlab/v4/objects/groups.py')
-rw-r--r-- | gitlab/v4/objects/groups.py | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/gitlab/v4/objects/groups.py b/gitlab/v4/objects/groups.py index 7016e52..4ac47e3 100644 --- a/gitlab/v4/objects/groups.py +++ b/gitlab/v4/objects/groups.py @@ -83,7 +83,7 @@ class Group(SaveMixin, ObjectDeleteMixin, RESTObject): """Transfer a project to this group. Args: - to_project_id (int): ID of the project to transfer + to_project_id: ID of the project to transfer **kwargs: Extra options to send to the server (e.g. sudo) Raises: @@ -101,8 +101,8 @@ class Group(SaveMixin, ObjectDeleteMixin, RESTObject): """Search the group resources matching the provided string.' Args: - scope (str): Scope of the search - search (str): Search string + scope: Scope of the search + search: Search string **kwargs: Extra options to send to the server (e.g. sudo) Raises: @@ -110,7 +110,7 @@ class Group(SaveMixin, ObjectDeleteMixin, RESTObject): GitlabSearchError: If the server failed to perform the request Returns: - GitlabList: A list of dicts describing the resources found. + A list of dicts describing the resources found. """ data = {"scope": scope, "search": search} path = f"/groups/{self.get_id()}/search" @@ -124,10 +124,10 @@ class Group(SaveMixin, ObjectDeleteMixin, RESTObject): """Add an LDAP group link. Args: - cn (str): CN of the LDAP group - group_access (int): Minimum access level for members of the LDAP + cn: CN of the LDAP group + group_access: Minimum access level for members of the LDAP group - provider (str): LDAP provider for the LDAP group + provider: LDAP provider for the LDAP group **kwargs: Extra options to send to the server (e.g. sudo) Raises: @@ -146,8 +146,8 @@ class Group(SaveMixin, ObjectDeleteMixin, RESTObject): """Delete an LDAP group link. Args: - cn (str): CN of the LDAP group - provider (str): LDAP provider for the LDAP group + cn: CN of the LDAP group + provider: LDAP provider for the LDAP group **kwargs: Extra options to send to the server (e.g. sudo) Raises: @@ -187,8 +187,8 @@ class Group(SaveMixin, ObjectDeleteMixin, RESTObject): """Share the group with a group. Args: - group_id (int): ID of the group. - group_access (int): Access level for the group. + group_id: ID of the group. + group_access: Access level for the group. **kwargs: Extra options to send to the server (e.g. sudo) Raises: @@ -215,7 +215,7 @@ class Group(SaveMixin, ObjectDeleteMixin, RESTObject): """Delete a shared group link within a group. Args: - group_id (int): ID of the group. + group_id: ID of the group. **kwargs: Extra options to send to the server (e.g. sudo) Raises: @@ -306,20 +306,20 @@ class GroupManager(CRUDMixin, RESTManager): ) -> Union[Dict[str, Any], requests.Response]: """Import a group from an archive file. - Args: - file: Data or file object containing the group - path (str): The path for the new group to be imported. - name (str): The name for the new group. - parent_id (str): ID of a parent group that the group will - be imported into. - **kwargs: Extra options to send to the server (e.g. sudo) + Args: + file: Data or file object containing the group + path: The path for the new group to be imported. + name: The name for the new group. + parent_id: ID of a parent group that the group will + be imported into. + **kwargs: Extra options to send to the server (e.g. sudo) - Raises: - GitlabAuthenticationError: If authentication is not correct - GitlabImportError: If the server failed to perform the request + Raises: + GitlabAuthenticationError: If authentication is not correct + GitlabImportError: If the server failed to perform the request - Returns: - dict: A representation of the import status. + Returns: + A representation of the import status. """ files = {"file": ("file.tar.gz", file, "application/octet-stream")} data = {"path": path, "name": name} |