From 7e5a586f858e79e67aa57624fb2f3869f09d9677 Mon Sep 17 00:00:00 2001 From: Ronan Lamy Date: Fri, 19 Aug 2022 14:00:34 +0100 Subject: [PATCH] fs: Remove redundant .isdvc() check fs.walk(..., dvc_only=True) already outputs dvc objects only, so fs.isdvc(path, recursive=True) is always True. --- dvc/repo/ls.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/dvc/repo/ls.py b/dvc/repo/ls.py index 16c236a33..efbc7fd62 100644 --- a/dvc/repo/ls.py +++ b/dvc/repo/ls.py @@ -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