Skip to content

Commit aab4c7d

Browse files
committed
Remove blocking flag
1 parent ed47d58 commit aab4c7d

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

mergin/client_push.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,9 @@ def _split_by_type(self, changes: Dict[str, List[dict]]) -> List[Dict[str, List[
125125
Split raw filtered changes into two batches:
126126
1. Blocking: updated/removed and added files that are blocking
127127
2. Non-blocking: added files that are not blocking
128-
129-
Adds blocking key with a boolean value for each group
130128
"""
131-
blocking_changes = {"added": [], "updated": [], "removed": [], "blocking": True}
132-
non_blocking_changes = {"added": [], "updated": [], "removed": [], "blocking": False}
129+
blocking_changes = {"added": [], "updated": [], "removed": []}
130+
non_blocking_changes = {"added": [], "updated": [], "removed": []}
133131

134132
for f in changes.get("added", []):
135133
if self.is_blocking_file(f):
@@ -144,9 +142,9 @@ def _split_by_type(self, changes: Dict[str, List[dict]]) -> List[Dict[str, List[
144142
blocking_changes["removed"].append(f)
145143

146144
result = []
147-
if any(blocking_changes[k] for k in ("added", "updated", "removed")):
145+
if any(len(v) for v in blocking_changes.values()):
148146
result.append(blocking_changes)
149-
if any(non_blocking_changes["added"]):
147+
if any(len(v) for v in non_blocking_changes.values()):
150148
result.append(non_blocking_changes)
151149

152150
return result

mergin/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
this_dir = os.path.dirname(os.path.realpath(__file__))
1616

1717

18-
# Error code from the public API, add to the end of enum as we handle more eror
18+
# Error code from the public API, add to the end of enum as we handle more error
1919
class ErrorCode(Enum):
2020
ProjectsLimitHit = "ProjectsLimitHit"
2121
StorageLimitHit = "StorageLimitHit"

mergin/merginproject.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@ def apply_push_changes(self, changes):
686686
"""
687687
For geodiff files update basefiles according to changes pushed to server.
688688
689-
:param changes: metadata for pulled files
689+
:param changes: metadata for pushed files
690690
:type changes: dict[str, list[dict]]
691691
"""
692692
for k, v in changes.items():

0 commit comments

Comments
 (0)