Skip to content

Commit

Permalink
style(objects): add spacing to docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
nejch authored and JohnVillalovos committed Feb 2, 2022
1 parent 8ce0336 commit 700d25d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion gitlab/v4/objects/artifacts.py
Expand Up @@ -17,6 +17,7 @@

class ProjectArtifact(RESTObject):
"""Dummy object to manage custom actions on artifacts"""

_id_attr = "ref_name"


Expand Down Expand Up @@ -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.
Expand All @@ -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.
"""
Expand All @@ -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,
Expand All @@ -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.
Expand All @@ -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.
"""
Expand Down

0 comments on commit 700d25d

Please sign in to comment.