Skip to content

Commit

Permalink
Typing and formatting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
peterallenwebb committed Jun 18, 2024
1 parent 4ffdc03 commit 952de07
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion dbt_common/clients/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
7 changes: 5 additions & 2 deletions dbt_common/record.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 952de07

Please sign in to comment.