Skip to content

Commit d9dcdf1

Browse files
committed
Move InvalidArgumentError into function
1 parent ef600b0 commit d9dcdf1

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

dvc/commands/dag.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from dvc.cli import formatter
44
from dvc.cli.command import CmdBase
55
from dvc.cli.utils import append_doc_link
6-
from dvc.exceptions import InvalidArgumentError
76
from dvc.ui import ui
87

98
if TYPE_CHECKING:
@@ -190,6 +189,8 @@ def _build(repo, target=None, full=False, outs=False, collapse_foreach_matrix=Fa
190189

191190
class CmdDAG(CmdBase):
192191
def run(self):
192+
from dvc.exceptions import InvalidArgumentError
193+
193194
if self.args.outs and self.args.collapse_foreach_matrix:
194195
raise InvalidArgumentError(
195196
"`--outs` and `--collapse-foreach-matrix` are mutually exclusive"

0 commit comments

Comments
 (0)