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

a slight rework of 955 to keep a seperation of concerns #957

Merged
merged 2 commits into from
Oct 6, 2023

Conversation

McKnight-42
Copy link
Contributor

resolves #
docs dbt-labs/docs.getdbt.com/#

Problem

we implemented a change in #955 to fix query_header in doing so moved self.query_header into the same conditional logic as self.profile and used a walrus operator to assign and check which while clean does make parse code quickly slightly harder.

Solution

to functionalize the small snippet and create a small change by making it to two nested if statements and moving the empty set of variable to top of function.

Checklist

  • I have read the contributing guide and understand what's expected of me
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc) or this PR has already received feedback and approval from Product or DX

@McKnight-42 McKnight-42 self-assigned this Oct 6, 2023
@McKnight-42 McKnight-42 requested a review from a team as a code owner October 6, 2023 20:02
@McKnight-42 McKnight-42 requested a review from Fleid October 6, 2023 20:02
@cla-bot cla-bot bot added the cla:yes label Oct 6, 2023
@McKnight-42 McKnight-42 added Skip Changelog Skips GHA to check for changelog file and removed cla:yes labels Oct 6, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2023

Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the dbt-bigquery contributing guide.

@McKnight-42 McKnight-42 marked this pull request as draft October 6, 2023 20:12
@cla-bot cla-bot bot added the cla:yes label Oct 6, 2023
@McKnight-42 McKnight-42 marked this pull request as ready for review October 6, 2023 20:21
Copy link
Contributor

@VersusFacit VersusFacit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Big fan of this assuming the tests are all happy and you've tested the semantics :) The function gets us bonus documentation as to what/why is happening!

Thanks for being detail oriented!

@McKnight-42 McKnight-42 merged commit 3e8d389 into main Oct 6, 2023
28 checks passed
@McKnight-42 McKnight-42 deleted the McKnight-42/rework-955 branch October 6, 2023 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla:yes Skip Changelog Skips GHA to check for changelog file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants