Skip to content

Commit

Permalink
Cleanup code
Browse files Browse the repository at this point in the history
  • Loading branch information
sultaniman committed Mar 22, 2024
1 parent 67b6ab3 commit 897d08e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dlt/common/cli/runner/inquirer.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,13 @@ def ask(self, message: str, options: t.List[str], default: t.Optional[str] = Non

def preflight_checks(self) -> None:
if pipeline_name := self.params.pipeline_name:
if pipeline_name not in self.pipelines and pipeline_name not in self.aliases:
if pipeline_name not in self.pipelines:
fmt.error(f"Pipeline {pipeline_name} has not been found in pipeline script")
fmt.error("You can choose one of: " + ", ".join(self.pipelines.keys()))
raise PreflightError()

if source_name := self.params.source_name:
if source_name not in self.sources and source_name not in self.aliases:
if source_name not in self.sources:
fmt.error(
f"Source or resouce with name: {source_name} has not been found in pipeline"
" script"
Expand Down

0 comments on commit 897d08e

Please sign in to comment.