summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleksii Shkurupii <Oleksii.Shkurupii@playtech.com>2020-08-29 10:08:40 +0300
committerOleksii Shkurupii <Oleksii.Shkurupii@playtech.com>2020-08-29 10:08:40 +0300
commit696147922552a8e6ddda3a5b852ee2de6b983e37 (patch)
tree23a3357d9af8b983170cfa9634310739b4038811
parent1317f4b62afefcb2504472d5b5d8e24f39b0d86f (diff)
downloadgitlab-696147922552a8e6ddda3a5b852ee2de6b983e37.tar.gz
chore: make latest black happy with existing code
-rw-r--r--gitlab/tests/objects/test_commits.py8
-rw-r--r--gitlab/tests/objects/test_runners.py12
-rw-r--r--gitlab/v4/objects.py26
-rw-r--r--tools/python_test_v4.py7
4 files changed, 43 insertions, 10 deletions
diff --git a/gitlab/tests/objects/test_commits.py b/gitlab/tests/objects/test_commits.py
index 9d11508..6b98117 100644
--- a/gitlab/tests/objects/test_commits.py
+++ b/gitlab/tests/objects/test_commits.py
@@ -88,7 +88,13 @@ def test_create_commit(project, resp_create_commit):
data = {
"branch": "master",
"commit_message": "Commit message",
- "actions": [{"action": "create", "file_path": "README", "content": "",}],
+ "actions": [
+ {
+ "action": "create",
+ "file_path": "README",
+ "content": "",
+ }
+ ],
}
commit = project.commits.create(data)
assert commit.short_id == "ed899a2f"
diff --git a/gitlab/tests/objects/test_runners.py b/gitlab/tests/objects/test_runners.py
index 490ba36..30fdb41 100644
--- a/gitlab/tests/objects/test_runners.py
+++ b/gitlab/tests/objects/test_runners.py
@@ -167,7 +167,9 @@ def resp_runner_delete():
status=200,
)
rsps.add(
- method=responses.DELETE, url=pattern, status=204,
+ method=responses.DELETE,
+ url=pattern,
+ status=204,
)
yield rsps
@@ -177,7 +179,9 @@ def resp_runner_disable():
with responses.RequestsMock() as rsps:
pattern = re.compile(r".*?/(groups|projects)/1/runners/6")
rsps.add(
- method=responses.DELETE, url=pattern, status=204,
+ method=responses.DELETE,
+ url=pattern,
+ status=204,
)
yield rsps
@@ -187,7 +191,9 @@ def resp_runner_verify():
with responses.RequestsMock() as rsps:
pattern = re.compile(r".*?/runners/verify")
rsps.add(
- method=responses.POST, url=pattern, status=200,
+ method=responses.POST,
+ url=pattern,
+ status=200,
)
yield rsps
diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py
index 9893d1d..e515ea1 100644
--- a/gitlab/v4/objects.py
+++ b/gitlab/v4/objects.py
@@ -711,8 +711,14 @@ class ProjectDeployTokenManager(ListMixin, CreateMixin, DeleteMixin, RESTManager
_from_parent_attrs = {"project_id": "id"}
_obj_cls = ProjectDeployToken
_create_attrs = (
- ("name", "scopes",),
- ("expires_at", "username",),
+ (
+ "name",
+ "scopes",
+ ),
+ (
+ "expires_at",
+ "username",
+ ),
)
@@ -725,8 +731,14 @@ class GroupDeployTokenManager(ListMixin, CreateMixin, DeleteMixin, RESTManager):
_from_parent_attrs = {"group_id": "id"}
_obj_cls = GroupDeployToken
_create_attrs = (
- ("name", "scopes",),
- ("expires_at", "username",),
+ (
+ "name",
+ "scopes",
+ ),
+ (
+ "expires_at",
+ "username",
+ ),
)
@@ -4205,7 +4217,11 @@ class ProjectServiceManager(GetMixin, UpdateMixin, DeleteMixin, ListMixin, RESTM
),
),
"jira": (
- ("url", "username", "password",),
+ (
+ "url",
+ "username",
+ "password",
+ ),
(
"api_url",
"active",
diff --git a/tools/python_test_v4.py b/tools/python_test_v4.py
index 717bd24..21faf9e 100644
--- a/tools/python_test_v4.py
+++ b/tools/python_test_v4.py
@@ -701,7 +701,12 @@ deploy_token_group = gl.groups.create(
# Remove once https://gitlab.com/gitlab-org/gitlab/-/issues/211878 is fixed
deploy_token = deploy_token_group.deploytokens.create(
- {"name": "foo", "username": "", "expires_at": "", "scopes": ["read_repository"],}
+ {
+ "name": "foo",
+ "username": "",
+ "expires_at": "",
+ "scopes": ["read_repository"],
+ }
)
assert len(deploy_token_group.deploytokens.list()) == 1