Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Aug 31, 2022
1 parent f2e9c43 commit 96ceea7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion dvc/dvcfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,9 @@ def _dump_lockfile(self, stage):
@staticmethod
def _check_if_parametrized(stage, action: str = "dump") -> None:
if stage.raw_data.parametrized:
raise ParametrizedDumpError(f"cannot {action} a parametrized {stage}")
raise ParametrizedDumpError(
f"cannot {action} a parametrized {stage}"
)

def _dump_pipeline_file(self, stage):
self._check_if_parametrized(stage)
Expand Down
8 changes: 6 additions & 2 deletions dvc/repo/stage.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,13 +205,17 @@ def create(
restore_fields(stage)
return stage

def from_target(self, target: str, accept_group: bool = True, glob: bool = False) -> StageList:
def from_target(
self, target: str, accept_group: bool = True, glob: bool = False
) -> StageList:
"""
Returns a list of stage from the provided target.
(see load method below for further details)
"""
path, name = parse_target(target, isa_glob=glob)
return self.load_all(path=path, name=name, accept_group=accept_group, glob=glob)
return self.load_all(
path=path, name=name, accept_group=accept_group, glob=glob
)

def get_target(self, target: str) -> "Stage":
"""
Expand Down

0 comments on commit 96ceea7

Please sign in to comment.