Skip to content

Commit dd652f2

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent bf1e838 commit dd652f2

File tree

2 files changed

+5
-16
lines changed

2 files changed

+5
-16
lines changed

dvc/commands/ls/__init__.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@ def fmt(entry):
4040
if with_size or with_md5:
4141
ui.table(
4242
[
43-
_format_entry(
44-
entry, fmt, with_size=with_size, with_md5=with_md5
45-
)
43+
_format_entry(entry, fmt, with_size=with_size, with_md5=with_md5)
4644
for entry in entries
4745
]
4846
)
@@ -143,9 +141,7 @@ def add_parser(subparsers, parent_parser):
143141
),
144142
)
145143
list_parser.add_argument("--size", action="store_true", help="Show sizes.")
146-
list_parser.add_argument(
147-
"--md5", action="store_true", help="Show MD5 checksums."
148-
)
144+
list_parser.add_argument("--md5", action="store_true", help="Show MD5 checksums.")
149145
list_parser.add_argument(
150146
"path",
151147
nargs="?",

tests/func/test_ls.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,7 @@ def test_ls_repo_with_path_dir_dvc_only_empty(tmp_dir, dvc, scm):
153153

154154
assert Repo.ls(os.fspath(tmp_dir), path="folder", dvc_only=True) == []
155155

156-
assert (
157-
Repo.ls(os.fspath(tmp_dir), path="empty_dvc_folder", dvc_only=True)
158-
== []
159-
)
156+
assert Repo.ls(os.fspath(tmp_dir), path="empty_dvc_folder", dvc_only=True) == []
160157

161158

162159
def test_ls_repo_with_path_subdir(tmp_dir, dvc, scm):
@@ -191,9 +188,7 @@ def test_ls_repo_with_path_subdir_dvc_only_recursive(tmp_dir, dvc, scm):
191188

192189
path = os.path.join("data", "subcontent")
193190
files = Repo.ls(os.fspath(tmp_dir), path, dvc_only=True, recursive=True)
194-
match_files(
195-
files, ((("data.xml",), True), (("statistics", "data.csv"), True))
196-
)
191+
match_files(files, ((("data.xml",), True), (("statistics", "data.csv"), True)))
197192

198193

199194
def test_ls_repo_with_path_file_out(tmp_dir, dvc, scm):
@@ -616,9 +611,7 @@ def _list_files(repo, path=None):
616611
dvc_files = {"dvc_dir", "foo.txt", "foo.txt.dvc", "dvc_dir.dvc"}
617612
common_outputs = git_tracked_outputs | extras | dvc_files
618613

619-
top_level_outputs = (
620-
common_outputs if dvc_top_level else git_tracked_outputs
621-
)
614+
top_level_outputs = common_outputs if dvc_top_level else git_tracked_outputs
622615
assert _list_files(erepo) == top_level_outputs
623616
assert _list_files(erepo, "scm_dir") == {"ipsum"}
624617
if dvc_top_level:

0 commit comments

Comments
 (0)