Skip to content

Commit

Permalink
ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxHalford committed Sep 10, 2024
1 parent a4357b4 commit e90c8c5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
4 changes: 3 additions & 1 deletion lea/clients/bigquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@ def list_columns(self) -> pd.DataFrame:
"""
)

def _view_key_to_table_reference(self, view_key: tuple[str], with_context: bool, with_project_id=False) -> str:
def _view_key_to_table_reference(
self, view_key: tuple[str], with_context: bool, with_project_id=False
) -> str:
"""
>>> client = BigQuery(
Expand Down
14 changes: 7 additions & 7 deletions lea/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,19 +216,19 @@ def _make_table_reference_mapping(
warnings.warn("Setting freeze_unselected without selecting views is not encouraged")

table_reference_mapping = {
self.client._view_key_to_table_reference(
view_key, with_context=False
): (
self.client._view_key_to_table_reference(view_key, with_context=False): (
# When freeze_unselected is specified, it means we want our views to target the production
# database. Therefore, we only have to rename the table references for the views that were
# selected.
self.client._view_key_to_table_reference(view_key, with_context=True) if (freeze_unselected and view_key in selected_view_keys)
self.client._view_key_to_table_reference(view_key, with_context=True)
if (freeze_unselected and view_key in selected_view_keys)
# If freeze_unselected is specified, we want to make sure the unselected views are
# targeting the right project.
else self.client._view_key_to_table_reference(view_key, with_context=False, with_project_id=True)
else self.client._view_key_to_table_reference(
view_key, with_context=False, with_project_id=True
)
)
for view_key in
self.regular_views
for view_key in self.regular_views
}

return table_reference_mapping
Expand Down

0 comments on commit e90c8c5

Please sign in to comment.