mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
Fix Repo instantiation error when using fsspec chaining API
This commit is contained in:
committed by
Ruslan Kuprieiev
parent
9a4578cc72
commit
ba0834caa0
@@ -83,6 +83,11 @@ class _DVCFileSystem(AbstractFileSystem): # pylint:disable=abstract-method
|
||||
repo: Optional["Repo"] = None,
|
||||
subrepos: bool = False,
|
||||
repo_factory: Optional[RepoFactory] = None,
|
||||
fo: Optional[str] = None,
|
||||
# pylint:disable-next=unused-argument
|
||||
target_options: Optional[Dict[str, Any]] = None, # noqa: ARG002
|
||||
# pylint:disable-next=unused-argument
|
||||
target_protocol: Optional[str] = None, # noqa: ARG002
|
||||
**repo_kwargs: Any,
|
||||
) -> None:
|
||||
"""DVC + git-tracked files fs.
|
||||
@@ -125,6 +130,7 @@ class _DVCFileSystem(AbstractFileSystem): # pylint:disable=abstract-method
|
||||
super().__init__()
|
||||
self._repo_stack = ExitStack()
|
||||
if repo is None:
|
||||
url = url if url is not None else fo
|
||||
repo = self._make_repo(url=url, rev=rev, subrepos=subrepos, **repo_kwargs)
|
||||
assert repo is not None
|
||||
# pylint: disable=protected-access
|
||||
|
||||
Reference in New Issue
Block a user