From 4348832b44d26a6cca7255d817c2e062575e11f2 Mon Sep 17 00:00:00 2001 From: Saugat Pachhai Date: Tue, 2 Feb 2021 15:11:13 +0545 Subject: [PATCH] keep stage.dump and dvcfile.dump in sync (#5382) --- dvc/command/stage.py | 2 +- dvc/stage/__init__.py | 4 ++-- tests/unit/test_params.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dvc/command/stage.py b/dvc/command/stage.py index f51c446a1..9fbaf09a3 100644 --- a/dvc/command/stage.py +++ b/dvc/command/stage.py @@ -135,7 +135,7 @@ class CmdStageAdd(CmdBase): with repo.scm.track_file_changes(config=repo.config): stage.ignore_outs() - stage.dump() + stage.dump(update_lock=False) return 0 diff --git a/dvc/stage/__init__.py b/dvc/stage/__init__.py index 5480e4eee..601ee0db9 100644 --- a/dvc/stage/__init__.py +++ b/dvc/stage/__init__.py @@ -701,8 +701,8 @@ class Stage(params.StageParams): self.outs[0].merge(ancestor_out, other.outs[0]) - def dump(self, update_lock: bool = False): - self.dvcfile.dump(self, update_lock=update_lock) + def dump(self, **kwargs): + self.dvcfile.dump(self, **kwargs) class PipelineStage(Stage): diff --git a/tests/unit/test_params.py b/tests/unit/test_params.py index 9b777caf1..f184e1142 100644 --- a/tests/unit/test_params.py +++ b/tests/unit/test_params.py @@ -27,7 +27,7 @@ def test_repro_unicode(tmp_dir, dvc, dummy_stage): dummy_stage(params=[{"settings.json": ["Ω_value"]}]) (stage,) = dvc.reproduce(dry=True) stage.cmd = "foo" - stage.dvcfile._lockfile.dump(stage) + stage.dump() dvc.remove(stage.name) assert not (tmp_dir / "dvc.yaml").exists()