@@ -334,12 +334,12 @@ def invalidate_cache(self, path: Optional[str] = None) -> None:
334334 (resolved_path .repo_type , resolved_path .repo_id , resolved_path .revision ), None
335335 )
336336
337- def _open (
337+ def _open ( # type: ignore[override]
338338 self ,
339339 path : str ,
340340 mode : str = "rb" ,
341- revision : Optional [str ] = None ,
342341 block_size : Optional [int ] = None ,
342+ revision : Optional [str ] = None ,
343343 ** kwargs ,
344344 ) -> Union ["HfFileSystemFile" , "HfFileSystemStreamFile" ]:
345345 block_size = block_size if block_size is not None else self .block_size
@@ -585,7 +585,7 @@ def walk(self, path: str, *args, **kwargs) -> Iterator[tuple[str, list[str], lis
585585 path = self .resolve_path (path , revision = kwargs .get ("revision" )).unresolve ()
586586 yield from super ().walk (path , * args , ** kwargs )
587587
588- def glob (self , path : str , ** kwargs ) -> list [str ]:
588+ def glob (self , path : str , maxdepth : Optional [ int ] = None , ** kwargs ) -> list [str ]:
589589 """
590590 Find files by glob-matching.
591591
@@ -599,7 +599,7 @@ def glob(self, path: str, **kwargs) -> list[str]:
599599 `list[str]`: List of paths matching the pattern.
600600 """
601601 path = self .resolve_path (path , revision = kwargs .get ("revision" )).unresolve ()
602- return super ().glob (path , ** kwargs )
602+ return super ().glob (path , maxdepth = maxdepth , ** kwargs )
603603
604604 def find (
605605 self ,
0 commit comments