fs: Remove redundant .isdvc() check

fs.walk(..., dvc_only=True) already outputs dvc objects only, so
fs.isdvc(path, recursive=True) is always True.
This commit is contained in:
Ronan Lamy
2022-08-23 23:20:42 +03:00
committed by Ruslan Kuprieiev
parent c76a84b7b1
commit 7e5a586f85
+5 -6
View File
@@ -85,11 +85,10 @@ def _ls(
ret = {}
for name, info in infos.items():
dvc_info = info.get("dvc_info", {})
if fs.isdvc(info["name"], recursive=True) or not dvc_only:
ret[name] = {
"isout": dvc_info.get("isout", False),
"isdir": info["type"] == "directory",
"isexec": info.get("isexec", False),
}
ret[name] = {
"isout": dvc_info.get("isout", False),
"isdir": info["type"] == "directory",
"isexec": info.get("isexec", False),
}
return ret