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

Change metadata_vars if not to if ... is None #37

Merged
merged 1 commit into from
Jan 24, 2024
Merged
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/Under the Hood-20240123-194242.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Under the Hood
body: Change metadata_vars \`if not\` to \`if ... is None\`
time: 2024-01-23T19:42:42.95727089Z
custom:
Author: truls-p
Issue: "6073"
2 changes: 1 addition & 1 deletion dbt_common/events/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def fire_event(e: BaseEvent, level: Optional[EventLevel] = None) -> None:

def get_metadata_vars() -> Dict[str, str]:
global metadata_vars
if not metadata_vars:
if metadata_vars is None:
metadata_vars = {
k[len(_METADATA_ENV_PREFIX) :]: v for k, v in os.environ.items() if k.startswith(_METADATA_ENV_PREFIX)
}
Expand Down