From 952de076cfbedc05bc06f726e3edd1e0e7e54e29 Mon Sep 17 00:00:00 2001 From: Peter Allen Webb Date: Tue, 18 Jun 2024 15:56:15 -0400 Subject: [PATCH] Typing and formatting fixes --- dbt_common/clients/system.py | 3 ++- dbt_common/record.py | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/dbt_common/clients/system.py b/dbt_common/clients/system.py index 57465a76..00a1ac69 100644 --- a/dbt_common/clients/system.py +++ b/dbt_common/clients/system.py @@ -62,7 +62,8 @@ def _include(self) -> bool: # Do not record or replay filesystem searches that were performed against # files which are actually part of dbt's implementation. return ( - "dbt/include" not in self.root_path # TODO: This actually obviates the next two checks but is probably too coarse? + "dbt/include" + not in self.root_path # TODO: This actually obviates the next two checks but is probably too coarse? and "dbt/include/global_project" not in self.root_path and "/plugins/postgres/dbt/include/" not in self.root_path ) diff --git a/dbt_common/record.py b/dbt_common/record.py index c9c01ae7..57bd638c 100644 --- a/dbt_common/record.py +++ b/dbt_common/record.py @@ -131,7 +131,7 @@ def __init__( self.mode = mode self.recorded_types = types self._records_by_type: Dict[str, List[Record]] = {} - self._unprocessed_records_by_type: Dict[str, Dict[str, Any]] = {} + self._unprocessed_records_by_type: Dict[str, List[Dict[str, Any]]] = {} self._replay_diffs: List["Diff"] = [] self.diff: Optional[Diff] = None self.previous_recording_path = previous_recording_path @@ -292,7 +292,10 @@ def record_replay_wrapper(*args, **kwargs): if recorder is None: return func_to_record(*args, **kwargs) - if recorder.recorded_types is not None and record_type.__name__ not in recorder.recorded_types: + if ( + recorder.recorded_types is not None + and record_type.__name__ not in recorder.recorded_types + ): return func_to_record(*args, **kwargs) # For methods, peel off the 'self' argument before calling the