Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove walrus operator to make 1.5 py37 compatible #868

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changes/unreleased/Fixes-20230808-113928.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Fixes
body: Revert usage of the walrus operator to extend py37 support
time: 2023-08-08T11:39:28.603598-04:00
custom:
Author: mikealfare
Issue: "868"
3 changes: 2 additions & 1 deletion dbt/adapters/bigquery/column.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,8 @@ def _update_nested_column_data_types(
else None
)

if existing_nested_column_data_type := nested_column_data_types.get(root_column_name):
existing_nested_column_data_type = nested_column_data_types.get(root_column_name)
if existing_nested_column_data_type:
assert isinstance(existing_nested_column_data_type, dict) # keeping mypy happy
# entry could already exist if this is a parent column -- preserve the parent data type under "_PARENT_DATA_TYPE_KEY"
existing_nested_column_data_type.update(
Expand Down