Skip to content

Commit d1585fb

Browse files
MarcelGeoCopilot
andauthored
Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 337757f commit d1585fb

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

mergin/client_pull.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
from .common import CHUNK_SIZE, ClientError, DeltaChangeType, PullActionType
2626
from .models import ProjectDelta, ProjectDeltaChange, PullAction
2727
from .merginproject import MerginProject
28-
from .utils import cleanup_tmp_dir, int_version, save_to_file
29-
from typing import List, Optional, Tuple
28+
from .utils import cleanup_tmp_dir, save_to_file
29+
from typing import List, Optional
3030

3131
# status = download_project_async(...)
3232
#

mergin/merginproject.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import tempfile
1010
from datetime import datetime
1111
from dateutil.tz import tzlocal
12-
from dataclasses import asdict
12+
1313

1414
from .editor import prevent_conflicted_copy
1515

@@ -644,7 +644,7 @@ def get_local_delta(self, diff_directory: str) -> List[ProjectDeltaChange]:
644644
self.log.warning("failed to create changeset for " + path)
645645
# probably the database schema has been modified if geodiff cannot create changeset.
646646
# we will need to do full upload of the file
647-
pass
647+
648648
result.append(delta_item)
649649

650650
return result

mergin/test/test_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ def test_sync_diff(mc):
613613
project_info = mc.project_info_v2(mp.project_id(), mp.version())
614614
assert project_info.version == "v3"
615615
assert project_info.id == mp.project_id()
616-
f_remote = next((f for f in project_info.files if f.path == f_updated), None)
616+
617617
assert next((f for f in project_info.files if f.path == "renamed.gpkg"), None)
618618
assert not next((f for f in project_info.files if f.path == f_removed), None)
619619
assert not os.path.exists(mp.fpath_meta(f_removed))

mergin/test/test_client_pull.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ def test_get_diff_download_files():
3232
assert f2.downloaded_items[0].version == "v2"
3333

3434

35-
@pytest.fixture
3635
def test_get_download_items():
3736
with tempfile.TemporaryDirectory() as tmp_dir:
3837
# Case 1: Small file (one chunk)
3938
items = get_download_items("small.txt", 100, "v1", tmp_dir)
4039
assert len(items) == 1
40+
assert len(items) == 1
4141
assert items[0].file_path == "small.txt"
4242
assert items[0].size == 100
4343
assert items[0].part_index == 0

0 commit comments

Comments
 (0)