Skip to content

Commit e528c5b

Browse files
committed
black formatting
1 parent 2feb93c commit e528c5b

File tree

2 files changed

+11
-14
lines changed

2 files changed

+11
-14
lines changed

mergin/client.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,8 +1211,7 @@ def reset_local_changes(self, directory: str, files_to_reset: typing.List[str] =
12111211
self.download_files(directory, files_download, version=current_version)
12121212

12131213
def download_files(
1214-
self, project_dir: str, file_paths: typing.List[str], output_paths: typing.List[str] = None,
1215-
version: str = None
1214+
self, project_dir: str, file_paths: typing.List[str], output_paths: typing.List[str] = None, version: str = None
12161215
):
12171216
"""
12181217
Download project files at specified version. Get the latest if no version specified.
@@ -1267,8 +1266,9 @@ def list_workspace_members(self, workspace_id: int):
12671266
resp = self.get(f"v2/workspaces/{workspace_id}/members")
12681267
return json.load(resp)
12691268

1270-
def update_workspace_member(self, workspace_id: int, user_id: int, workspace_role: str,
1271-
reset_projects_roles: bool = False):
1269+
def update_workspace_member(
1270+
self, workspace_id: int, user_id: int, workspace_role: str, reset_projects_roles: bool = False
1271+
):
12721272
"""
12731273
Update workspace role of a workspace member, optionally resets the projects role
12741274
"""
@@ -1296,10 +1296,7 @@ def add_project_collaborator(self, project_id: int, user: str, project_role: str
12961296
"""
12971297
Add a user to project collaborators and grant them a project role
12981298
"""
1299-
params = {
1300-
"role": project_role,
1301-
"user": user
1302-
}
1299+
params = {"role": project_role, "user": user}
13031300
project_collaborator = self.post(f"v2/projects/{project_id}/collaborators", params, json_headers)
13041301
return json.load(project_collaborator)
13051302

mergin/test/test_client.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -355,8 +355,8 @@ def test_push_pull_changes(mc):
355355
assert os.path.exists(os.path.join(project_dir_2, "renamed.txt"))
356356
assert os.path.exists(os.path.join(project_dir_2, conflicted_copy_file_name(f_updated, API_USER, 1)))
357357
assert (
358-
generate_checksum(os.path.join(project_dir_2, conflicted_copy_file_name(f_updated, API_USER, 1)))
359-
== f_conflict_checksum
358+
generate_checksum(os.path.join(project_dir_2, conflicted_copy_file_name(f_updated, API_USER, 1)))
359+
== f_conflict_checksum
360360
)
361361
assert generate_checksum(os.path.join(project_dir_2, f_updated)) == f_remote_checksum
362362

@@ -2459,8 +2459,8 @@ def test_project_rename(mc: MerginClient):
24592459

24602460
# cannot rename with full project name
24612461
with pytest.raises(
2462-
ClientError,
2463-
match="Project's new name should be without workspace specification",
2462+
ClientError,
2463+
match="Project's new name should be without workspace specification",
24642464
):
24652465
mc.rename_project(project, "workspace" + "/" + test_project_renamed)
24662466

@@ -2711,8 +2711,8 @@ def test_error_projects_limit_hit(mcStorage: MerginClient):
27112711
mcStorage.create_project_and_push(test_project_fullname, project_dir)
27122712
assert e.value.server_code == ErrorCode.ProjectsLimitHit.value
27132713
assert (
2714-
e.value.detail
2715-
== "Maximum number of projects is reached. Please upgrade your subscription to create new projects (ProjectsLimitHit)"
2714+
e.value.detail
2715+
== "Maximum number of projects is reached. Please upgrade your subscription to create new projects (ProjectsLimitHit)"
27162716
)
27172717
assert e.value.http_error == 422
27182718
assert e.value.http_method == "POST"

0 commit comments

Comments
 (0)