Skip to content

Commit

Permalink
more defensive WarnErrorOptions.from_yaml_string
Browse files Browse the repository at this point in the history
  • Loading branch information
MichelleArk committed Jan 10, 2023
1 parent a9b395b commit 9c67e2d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/dbt/helper_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,9 @@ def from_yaml_string(cls, warn_error_options_str: Optional[str]):
# TODO: resolve circular import
from dbt.config.utils import parse_cli_yaml_string

warn_error_options_str = warn_error_options_str or "{}"
warn_error_options_str = (
str(warn_error_options_str) if warn_error_options_str is not None else "{}"
)
warn_error_options = parse_cli_yaml_string(warn_error_options_str, "warn-error-options")
return cls(
include=warn_error_options.get("include", []),
Expand Down

0 comments on commit 9c67e2d

Please sign in to comment.