Skip to content

Conversation

@christopherrya
Copy link

Remove unnecessary .keys() calls in dictionary membership checks. This avoids creating view objects and improves readability.

  • core/dbt/context/base.py: diff_of_two_dicts()
  • core/dbt/contracts/graph/manifest.py: build_node_edges(), build_macro_edges()
  • core/dbt/task/init.py: profile check

Resolves #

Problem

Solution

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 or 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.
  • This PR includes type annotations for new and modified functions.

Remove unnecessary .keys() calls in dictionary membership checks.
This avoids creating view objects and improves readability.

- core/dbt/context/base.py: diff_of_two_dicts()
- core/dbt/contracts/graph/manifest.py: build_node_edges(), build_macro_edges()
- core/dbt/task/init.py: profile check
@christopherrya christopherrya requested a review from a team as a code owner November 21, 2025 01:49
@cla-bot
Copy link

cla-bot bot commented Nov 21, 2025

Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA.

In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, please reach out through a comment on this PR.

CLA has not been signed by users: @christopherrya

@github-actions
Copy link
Contributor

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 contributing guide.

@github-actions github-actions bot added the community This PR is from a community member label Nov 21, 2025
@cla-bot cla-bot bot added the cla:yes label Nov 21, 2025
@christopherrya christopherrya force-pushed the optimize/dict-membership-checks branch from 7ca1f3b to afb6c14 Compare November 21, 2025 01:58
@christopherrya christopherrya force-pushed the optimize/dict-membership-checks branch from afb6c14 to 84585cb Compare November 21, 2025 02:01
@codecov
Copy link

codecov bot commented Nov 21, 2025

Codecov Report

❌ Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 91.93%. Comparing base (48218be) to head (84585cb).
⚠️ Report is 35 commits behind head on main.

❌ Your patch check has failed because the patch coverage (75.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12191      +/-   ##
==========================================
- Coverage   91.99%   91.93%   -0.06%     
==========================================
  Files         203      203              
  Lines       24863    24863              
==========================================
- Hits        22872    22859      -13     
- Misses       1991     2004      +13     
Flag Coverage Δ
integration 88.82% <75.00%> (-0.12%) ⬇️
unit 65.17% <25.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Unit Tests 65.17% <25.00%> (ø)
Integration Tests 88.82% <75.00%> (-0.12%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@MichelleArk
Copy link
Contributor

@christopherrya we started requiring commits with verified signatures a few months ago. Unfortunately, we need to get the commits of this PR signed before we can proceed 😞

If you don't have a GPG key already github has guides

Generating a new GPG key
Adding a GPG key to your GitHub account
Tell the git CLI about your GPG key
And then here is a stackoverflow about how to sign all commits on a branch: https://stackoverflow.com/a/41883164

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla:yes community This PR is from a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants