Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
peterallenwebb committed Jan 31, 2024
1 parent ce595e2 commit cc2a4f2
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions dbt_common/clients/jinja.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,10 +542,7 @@ def render_template(template, ctx: Dict[str, Any], node=None) -> str:
_TESTING_BLOCKS_CACHE: Dict[int, List[Union[BlockData, BlockTag]]] = {}


def _get_blocks_hash(text: str,
allowed_blocks: Optional[Set[str]],
collect_raw_data: bool
) -> int:
def _get_blocks_hash(text: str, allowed_blocks: Optional[Set[str]], collect_raw_data: bool) -> int:
"""Provides a hash function over the arguments to extract_toplevel_blocks, in order to support caching."""
allowed_tuple = tuple(sorted(allowed_blocks) or [])
return text.__hash__() + allowed_tuple.__hash__() + collect_raw_data.__hash__()
Expand Down

0 comments on commit cc2a4f2

Please sign in to comment.