From 3feaa866965f4ab3d393211a98f6b9594c1f2b31 Mon Sep 17 00:00:00 2001 From: Piotr Bielak Date: Mon, 1 Feb 2021 13:21:21 +0100 Subject: [PATCH] Pass missing `glob` flag to `pull` command (#5354) The `--glob` flag is parsed from the command line, but in the `CmdDataPull` class in the invocation the parameter (`self.args.glob`) is not passed to the `pull` method implementation. Hence, always the default value (False) is used. This commit fixes this issue and sets the `glob` parameter properly. --- dvc/command/data_sync.py | 1 + tests/unit/command/test_data_sync.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/dvc/command/data_sync.py b/dvc/command/data_sync.py index 5bbfdf4dc..310080b0c 100644 --- a/dvc/command/data_sync.py +++ b/dvc/command/data_sync.py @@ -37,6 +37,7 @@ class CmdDataPull(CmdDataBase): force=self.args.force, recursive=self.args.recursive, run_cache=self.args.run_cache, + glob=self.args.glob, ) self.log_summary(stats) except (CheckoutError, DvcException) as exc: diff --git a/tests/unit/command/test_data_sync.py b/tests/unit/command/test_data_sync.py index cd5c8253b..5f57eedd6 100644 --- a/tests/unit/command/test_data_sync.py +++ b/tests/unit/command/test_data_sync.py @@ -57,6 +57,7 @@ def test_pull(mocker): "--force", "--recursive", "--run-cache", + "--glob", ] ) assert cli_args.func == CmdDataPull @@ -77,6 +78,7 @@ def test_pull(mocker): force=True, recursive=True, run_cache=True, + glob=True, )