From dd652f237f327dc8abaff3bf5c399b5b13a51546 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 30 Sep 2024 14:40:27 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- dvc/commands/ls/__init__.py | 8 ++------ tests/func/test_ls.py | 13 +++---------- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/dvc/commands/ls/__init__.py b/dvc/commands/ls/__init__.py index 486c55e49f..023d6e0e41 100644 --- a/dvc/commands/ls/__init__.py +++ b/dvc/commands/ls/__init__.py @@ -40,9 +40,7 @@ def fmt(entry): if with_size or with_md5: ui.table( [ - _format_entry( - entry, fmt, with_size=with_size, with_md5=with_md5 - ) + _format_entry(entry, fmt, with_size=with_size, with_md5=with_md5) for entry in entries ] ) @@ -143,9 +141,7 @@ def add_parser(subparsers, parent_parser): ), ) list_parser.add_argument("--size", action="store_true", help="Show sizes.") - list_parser.add_argument( - "--md5", action="store_true", help="Show MD5 checksums." - ) + list_parser.add_argument("--md5", action="store_true", help="Show MD5 checksums.") list_parser.add_argument( "path", nargs="?", diff --git a/tests/func/test_ls.py b/tests/func/test_ls.py index 075f383dce..581450c504 100644 --- a/tests/func/test_ls.py +++ b/tests/func/test_ls.py @@ -153,10 +153,7 @@ def test_ls_repo_with_path_dir_dvc_only_empty(tmp_dir, dvc, scm): assert Repo.ls(os.fspath(tmp_dir), path="folder", dvc_only=True) == [] - assert ( - Repo.ls(os.fspath(tmp_dir), path="empty_dvc_folder", dvc_only=True) - == [] - ) + assert Repo.ls(os.fspath(tmp_dir), path="empty_dvc_folder", dvc_only=True) == [] 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): path = os.path.join("data", "subcontent") files = Repo.ls(os.fspath(tmp_dir), path, dvc_only=True, recursive=True) - match_files( - files, ((("data.xml",), True), (("statistics", "data.csv"), True)) - ) + match_files(files, ((("data.xml",), True), (("statistics", "data.csv"), True))) def test_ls_repo_with_path_file_out(tmp_dir, dvc, scm): @@ -616,9 +611,7 @@ def _list_files(repo, path=None): dvc_files = {"dvc_dir", "foo.txt", "foo.txt.dvc", "dvc_dir.dvc"} common_outputs = git_tracked_outputs | extras | dvc_files - top_level_outputs = ( - common_outputs if dvc_top_level else git_tracked_outputs - ) + top_level_outputs = common_outputs if dvc_top_level else git_tracked_outputs assert _list_files(erepo) == top_level_outputs assert _list_files(erepo, "scm_dir") == {"ipsum"} if dvc_top_level: