diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3a346b18..746db253 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,9 +20,23 @@ repos: - id: check-case-conflict - repo: local hooks: - - id: linter - name: linter - entry: hatch run lint:all + - id: black + name: black + entry: hatch run lint:black + language: system + types: [python] + pass_filenames: false + verbose: true + - id: flake8 + name: flake8 + entry: hatch run lint:flake8 + language: system + types: [python] + pass_filenames: false + verbose: true + - id: mypy + name: mypy + entry: hatch run lint:mypy language: system types: [python] pass_filenames: false diff --git a/dbt_common/clients/jinja.py b/dbt_common/clients/jinja.py index 897300aa..5b532b9f 100644 --- a/dbt_common/clients/jinja.py +++ b/dbt_common/clients/jinja.py @@ -114,7 +114,9 @@ def new_context( # This custom override makes the assumption that the locals and shared # parameters are not used, so enforce that. if shared or locals: - raise Exception("The MacroFuzzTemplate.new_context() override cannot use the shared or locals parameters.") + raise Exception( + "The MacroFuzzTemplate.new_context() override cannot use the shared or locals parameters." + ) parent = ChainMap(vars, self.globals) if self.globals else vars @@ -122,7 +124,9 @@ def new_context( def render(self, *args: Any, **kwargs: Any) -> Any: if kwargs or len(args) != 1: - raise Exception("The MacroFuzzTemplate.render() override requires exactly one argument.") + raise Exception( + "The MacroFuzzTemplate.render() override requires exactly one argument." + ) ctx = self.new_context(args[0])