diff options
author | Nejc Habjan <hab.nejc@gmail.com> | 2021-11-01 19:22:18 +0100 |
---|---|---|
committer | Nejc Habjan <hab.nejc@gmail.com> | 2021-11-02 07:03:33 +0100 |
commit | 30fa865cfe145d172b7061cb2af03837b3d1d312 (patch) | |
tree | 414f0a060d4dce56310327e07cbdcf7f41f39fc3 /gitlab/v4/objects/jobs.py | |
parent | c7fdad42f68927d79e0d1963ade3324370b9d0e2 (diff) | |
download | gitlab-refactor/f-strings.tar.gz |
refactor: use f-strings for string formattingrefactor/f-strings
Diffstat (limited to 'gitlab/v4/objects/jobs.py')
-rw-r--r-- | gitlab/v4/objects/jobs.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/gitlab/v4/objects/jobs.py b/gitlab/v4/objects/jobs.py index 2e7693d..9bd35d0 100644 --- a/gitlab/v4/objects/jobs.py +++ b/gitlab/v4/objects/jobs.py @@ -23,7 +23,7 @@ class ProjectJob(RefreshMixin, RESTObject): GitlabAuthenticationError: If authentication is not correct GitlabJobCancelError: If the job could not be canceled """ - path = "%s/%s/cancel" % (self.manager.path, self.get_id()) + path = f"{self.manager.path}/{self.get_id()}/cancel" return self.manager.gitlab.http_post(path) @cli.register_custom_action("ProjectJob") @@ -38,7 +38,7 @@ class ProjectJob(RefreshMixin, RESTObject): GitlabAuthenticationError: If authentication is not correct GitlabJobRetryError: If the job could not be retried """ - path = "%s/%s/retry" % (self.manager.path, self.get_id()) + path = f"{self.manager.path}/{self.get_id()}/retry" return self.manager.gitlab.http_post(path) @cli.register_custom_action("ProjectJob") @@ -53,7 +53,7 @@ class ProjectJob(RefreshMixin, RESTObject): GitlabAuthenticationError: If authentication is not correct GitlabJobPlayError: If the job could not be triggered """ - path = "%s/%s/play" % (self.manager.path, self.get_id()) + path = f"{self.manager.path}/{self.get_id()}/play" self.manager.gitlab.http_post(path) @cli.register_custom_action("ProjectJob") @@ -68,7 +68,7 @@ class ProjectJob(RefreshMixin, RESTObject): GitlabAuthenticationError: If authentication is not correct GitlabJobEraseError: If the job could not be erased """ - path = "%s/%s/erase" % (self.manager.path, self.get_id()) + path = f"{self.manager.path}/{self.get_id()}/erase" self.manager.gitlab.http_post(path) @cli.register_custom_action("ProjectJob") @@ -83,7 +83,7 @@ class ProjectJob(RefreshMixin, RESTObject): GitlabAuthenticationError: If authentication is not correct GitlabCreateError: If the request could not be performed """ - path = "%s/%s/artifacts/keep" % (self.manager.path, self.get_id()) + path = f"{self.manager.path}/{self.get_id()}/artifacts/keep" self.manager.gitlab.http_post(path) @cli.register_custom_action("ProjectJob") @@ -98,7 +98,7 @@ class ProjectJob(RefreshMixin, RESTObject): GitlabAuthenticationError: If authentication is not correct GitlabDeleteError: If the request could not be performed """ - path = "%s/%s/artifacts" % (self.manager.path, self.get_id()) + path = f"{self.manager.path}/{self.get_id()}/artifacts" self.manager.gitlab.http_delete(path) @cli.register_custom_action("ProjectJob") @@ -122,7 +122,7 @@ class ProjectJob(RefreshMixin, RESTObject): Returns: str: The artifacts if `streamed` is False, None otherwise. """ - path = "%s/%s/artifacts" % (self.manager.path, self.get_id()) + path = f"{self.manager.path}/{self.get_id()}/artifacts" result = self.manager.gitlab.http_get( path, streamed=streamed, raw=True, **kwargs ) @@ -150,7 +150,7 @@ class ProjectJob(RefreshMixin, RESTObject): Returns: str: The artifacts if `streamed` is False, None otherwise. """ - path = "%s/%s/artifacts/%s" % (self.manager.path, self.get_id(), path) + path = f"{self.manager.path}/{self.get_id()}/artifacts/{path}" result = self.manager.gitlab.http_get( path, streamed=streamed, raw=True, **kwargs ) @@ -177,7 +177,7 @@ class ProjectJob(RefreshMixin, RESTObject): Returns: str: The trace """ - path = "%s/%s/trace" % (self.manager.path, self.get_id()) + path = f"{self.manager.path}/{self.get_id()}/trace" result = self.manager.gitlab.http_get( path, streamed=streamed, raw=True, **kwargs ) |