summaryrefslogtreecommitdiff
path: root/gitlab/v4/objects
diff options
context:
space:
mode:
authorNejc Habjan <nejc.habjan@siemens.com>2022-02-02 01:10:43 +0100
committerJohn Villalovos <john@sodarock.com>2022-02-01 17:37:47 -0800
commit700d25d9bd812a64f5f1287bf50e8ddc237ec553 (patch)
tree0a374a309ae4ea69a29acaf172dbb189f0d33d06 /gitlab/v4/objects
parent8ce0336325b339fa82fe4674a528f4bb59963df7 (diff)
downloadgitlab-700d25d9bd812a64f5f1287bf50e8ddc237ec553.tar.gz
style(objects): add spacing to docstrings
Diffstat (limited to 'gitlab/v4/objects')
-rw-r--r--gitlab/v4/objects/artifacts.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/gitlab/v4/objects/artifacts.py b/gitlab/v4/objects/artifacts.py
index 2c382ca..dee2880 100644
--- a/gitlab/v4/objects/artifacts.py
+++ b/gitlab/v4/objects/artifacts.py
@@ -17,6 +17,7 @@ __all__ = ["ProjectArtifact", "ProjectArtifactManager"]
class ProjectArtifact(RESTObject):
"""Dummy object to manage custom actions on artifacts"""
+
_id_attr = "ref_name"
@@ -57,6 +58,7 @@ class ProjectArtifactManager(RESTManager):
**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 @@ class ProjectArtifactManager(RESTManager):
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 @@ class ProjectArtifactManager(RESTManager):
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 @@ class ProjectArtifactManager(RESTManager):
) -> 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 @@ class ProjectArtifactManager(RESTManager):
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.
"""