Skip to content

Commit

Permalink
Fixing the lacking data source error message on contract build (#2158)
Browse files Browse the repository at this point in the history
* Fixing the lacking data source error message on contract build

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
tombaeyens and pre-commit-ci[bot] authored Sep 9, 2024
1 parent 5cf12cb commit 8adf017
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions soda/contracts/soda/contracts/contract_verification.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,6 @@ def _initialize_data_source(self, contract_verification_builder: ContractVerific
self.data_source = data_source
else:
self.logs.error(f"Error creating data source from {data_source_yaml_file}. See logs above.")
else:
self.logs.error("No data source configured")

def _initialize_contracts(self, contract_verification_builder: ContractVerificationBuilder) -> None:
for contract_file in contract_verification_builder.contract_files:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def create_and_insert_test_table(

def get_parse_errors_str(self, contract_yaml_str: str) -> str:
contract_yaml_str = dedent(contract_yaml_str).strip()
contract_verification_builder = self.create_test_verification_builder().with_contract_yaml_str(
contract_verification_builder = ContractVerification.builder().with_contract_yaml_str(
contract_yaml_str=contract_yaml_str
)
contract_verification = contract_verification_builder.build()
Expand Down

0 comments on commit 8adf017

Please sign in to comment.