From 700d25d9bd812a64f5f1287bf50e8ddc237ec553 Mon Sep 17 00:00:00 2001 From: Nejc Habjan Date: Wed, 2 Feb 2022 01:10:43 +0100 Subject: [PATCH] style(objects): add spacing to docstrings --- gitlab/v4/objects/artifacts.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/gitlab/v4/objects/artifacts.py b/gitlab/v4/objects/artifacts.py index 2c382ca53..dee28804e 100644 --- a/gitlab/v4/objects/artifacts.py +++ b/gitlab/v4/objects/artifacts.py @@ -17,6 +17,7 @@ class ProjectArtifact(RESTObject): """Dummy object to manage custom actions on artifacts""" + _id_attr = "ref_name" @@ -57,6 +58,7 @@ def download( **kwargs: Any, ) -> Optional[bytes]: """Get the job artifacts archive from a specific tag or branch. + Args: ref_name: Branch or tag name in repository. HEAD or SHA references are not supported. @@ -69,9 +71,11 @@ def download( data chunk_size: Size of each chunk **kwargs: Extra options to send to the server (e.g. sudo) + Raises: GitlabAuthenticationError: If authentication is not correct GitlabGetError: If the artifacts could not be retrieved + Returns: The artifacts if `streamed` is False, None otherwise. """ @@ -83,7 +87,9 @@ def download( assert isinstance(result, requests.Response) return utils.response_content(result, streamed, action, chunk_size) - @cli.register_custom_action("ProjectArtifactManager", ("ref_name", "artifact_path", "job")) + @cli.register_custom_action( + "ProjectArtifactManager", ("ref_name", "artifact_path", "job") + ) @exc.on_http_error(exc.GitlabGetError) def raw( self, @@ -97,6 +103,7 @@ def raw( ) -> Optional[bytes]: """Download a single artifact file from a specific tag or branch from within the job's artifacts archive. + Args: ref_name: Branch or tag name in repository. HEAD or SHA references are not supported. @@ -109,9 +116,11 @@ def raw( data chunk_size: Size of each chunk **kwargs: Extra options to send to the server (e.g. sudo) + Raises: GitlabAuthenticationError: If authentication is not correct GitlabGetError: If the artifacts could not be retrieved + Returns: The artifact if `streamed` is False, None otherwise. """