@@ -20,13 +20,14 @@ def fetch(
2020 url : str ,
2121 objects : Collection [Pointer ],
2222 progress : Optional [Callable [["GitProgressEvent" ], None ]] = None ,
23+ batch_size : Optional [int ] = None ,
2324 ):
2425 from .client import LFSClient
2526
2627 with LFSCallback .as_lfs_callback (progress ) as cb :
2728 cb .set_size (len (objects ))
2829 with LFSClient .from_git_url (url ) as client :
29- client .download (self , objects , callback = cb )
30+ client .download (self , objects , callback = cb , batch_size = batch_size )
3031
3132 def oid_to_path (self , oid : str ):
3233 return os .path .join (self .path , "objects" , oid [0 :2 ], oid [2 :4 ], oid )
@@ -40,6 +41,7 @@ def open(
4041 self ,
4142 obj : Union [Pointer , str ],
4243 fetch_url : Optional [str ] = None ,
44+ batch_size : Optional [int ] = None ,
4345 ** kwargs ,
4446 ) -> BinaryIO :
4547 oid = obj if isinstance (obj , str ) else obj .oid
@@ -50,7 +52,7 @@ def open(
5052 if not fetch_url or not isinstance (obj , Pointer ):
5153 raise
5254 try :
53- self .fetch (fetch_url , [obj ])
55+ self .fetch (fetch_url , [obj ], batch_size = batch_size )
5456 except BaseException as exc : # noqa: BLE001
5557 raise FileNotFoundError (
5658 errno .ENOENT , os .strerror (errno .ENOENT ), path
0 commit comments