Skip to content

Commit b5a6a58

Browse files
committed
✨ Add --respect-no-flag to dvc data status cli command
1 parent b24983b commit b5a6a58

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

dvc/commands/data.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ def run(self) -> int:
112112
untracked_files=self.args.untracked_files,
113113
not_in_remote=self.args.not_in_remote,
114114
remote_refresh=self.args.remote_refresh,
115+
respect_no_push=self.args.respect_no_push,
115116
)
116117

117118
if not self.args.unchanged:
@@ -179,6 +180,12 @@ def add_parser(subparsers, parent_parser):
179180
default=False,
180181
help="Show files not in remote.",
181182
)
183+
data_status_parser.add_argument(
184+
"--respect-no-push",
185+
action="store_true",
186+
default=False,
187+
help="Respect the `push: false` flag in the DVC stage's outs.",
188+
)
182189
data_status_parser.add_argument(
183190
"--no-remote-refresh",
184191
dest="remote_refresh",

tests/unit/command/test_data_status.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ def test_cli(dvc, mocker, mocked_status):
5252
status.assert_called_once_with(
5353
untracked_files="all",
5454
not_in_remote=False,
55+
respect_no_push=False,
5556
remote_refresh=True,
5657
granular=True,
5758
)

0 commit comments

Comments
 (0)