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

Add Syntax Support for Types on Macro Parameters #229

Merged
merged 6 commits into from
Dec 10, 2024

Conversation

peterallenwebb
Copy link
Contributor

@peterallenwebb peterallenwebb commented Dec 10, 2024

Partially implements: dbt-labs/dbt-core#11090

This change customizes the jinja parser to allow for Python-style type annotations on macro parameters. It does not implement any functionality relying on the type information. That kind of functionality will be implemented in dbt-core.

Checklist

@cla-bot cla-bot bot added the cla:yes label Dec 10, 2024
Copy link

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.

@codecov-commenter
Copy link

codecov-commenter commented Dec 10, 2024

Codecov Report

Attention: Patch coverage is 92.10526% with 3 lines in your changes missing coverage. Please review.

Project coverage is 68.89%. Comparing base (965ad81) to head (525700c).

Files with missing lines Patch % Lines
dbt_common/clients/jinja.py 92.10% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #229      +/-   ##
==========================================
+ Coverage   68.42%   68.89%   +0.46%     
==========================================
  Files          52       52              
  Lines        3395     3433      +38     
==========================================
+ Hits         2323     2365      +42     
+ Misses       1072     1068       -4     
Flag Coverage Δ
unit 68.89% <92.10%> (+0.46%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

tests/unit/test_jinja.py Dismissed Show dismissed Hide dismissed
tests/unit/test_jinja.py Dismissed Show dismissed Hide dismissed
@peterallenwebb peterallenwebb marked this pull request as ready for review December 10, 2024 21:31
@peterallenwebb peterallenwebb requested a review from a team as a code owner December 10, 2024 21:31
@peterallenwebb peterallenwebb added this pull request to the merge queue Dec 10, 2024
Merged via the queue into main with commit 243568e Dec 10, 2024
15 checks passed
@peterallenwebb peterallenwebb deleted the paw/typed-macros branch December 10, 2024 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants