diff --git a/core/dbt/clients/jinja_static.py b/core/dbt/clients/jinja_static.py index 348cfe4d3d6..3d37cbd413b 100644 --- a/core/dbt/clients/jinja_static.py +++ b/core/dbt/clients/jinja_static.py @@ -111,7 +111,7 @@ def statically_parse_adapter_dispatch(func_call, ctx, db_wrapper): # keyword arguments if func_call.kwargs: for kwarg in func_call.kwargs: - if kwarg.key == 'macro_name': + if kwarg.key == "macro_name": # This will remain to enable static resolution if type(kwarg.value).__name__ == "Const": func_name = kwarg.value.value diff --git a/core/dbt/context/providers.py b/core/dbt/context/providers.py index e083ac90365..4748e5d2ece 100644 --- a/core/dbt/context/providers.py +++ b/core/dbt/context/providers.py @@ -129,7 +129,7 @@ def dispatch( search_packages: List[Optional[str]] if '.' in macro_name: - suggest_macro_namespace, suggest_macro_name = macro_name.split('.', 1) + suggest_macro_namespace, suggest_macro_name = macro_name.split(".", 1) msg = ( f'In adapter.dispatch, got a macro name of "{macro_name}", ' f'but "." is not a valid macro name component. Did you mean ' @@ -152,7 +152,7 @@ def dispatch( else: # Not a string and not None so must be a list raise CompilationException( - f'In adapter.dispatch, got a list macro_namespace argument ' + f"In adapter.dispatch, got a list macro_namespace argument " f'("{macro_namespace}"), but macro_namespace should be None or a string.' ) diff --git a/core/dbt/exceptions.py b/core/dbt/exceptions.py index 9763f269a40..9158939be1c 100644 --- a/core/dbt/exceptions.py +++ b/core/dbt/exceptions.py @@ -674,7 +674,7 @@ def macro_not_found(model, target_macro_id): def macro_invalid_dispatch_arg(macro_name) -> NoReturn: - msg = '''\ + msg = """\ The "packages" argument of adapter.dispatch() has been deprecated. Use the "macro_namespace" argument instead. @@ -683,7 +683,7 @@ def macro_invalid_dispatch_arg(macro_name) -> NoReturn: For more information, see: https://docs.getdbt.com/reference/dbt-jinja-functions/dispatch - ''' + """ raise_compiler_error(msg.format(macro_name))