Skip to content

Commit 6b3ef53

Browse files
authored
lfs: replace wrap_and_branch_coro with equivalent (#290)
1 parent fae6c63 commit 6b3ef53

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/scmrepo/git/lfs/client.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -190,15 +190,10 @@ async def _download(
190190
**kwargs,
191191
):
192192
async def _get_one(from_path: str, to_path: str, **kwargs):
193-
get_coro = callback.wrap_and_branch_coro(
194-
self.httpfs._get_file # pylint: disable=protected-access
195-
)
196193
with as_atomic(localfs, to_path, create_parents=True) as tmp_file:
197-
return await get_coro(
198-
from_path,
199-
tmp_file,
200-
**kwargs,
201-
)
194+
with callback.branch(from_path, tmp_file, kwargs):
195+
await self.httpfs._get_file(from_path, tmp_file, **kwargs) # pylint: disable=protected-access
196+
callback.relative_update()
202197

203198
resp_data = await self._batch_request(objects, **kwargs)
204199
if resp_data.get("transfer") != "basic":

0 commit comments

Comments
 (0)