[TIDY-FIRST] Type the runners - Part 3#12811
Merged
Conversation
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. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #12811 +/- ##
==========================================
- Coverage 91.41% 91.24% -0.17%
==========================================
Files 203 203
Lines 25881 25916 +35
==========================================
- Hits 23659 23648 -11
- Misses 2222 2268 +46
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Contributor
Author
|
This is a stacked PR |
This was referenced Apr 9, 2026
122b135 to
6c831bb
Compare
388b914 to
2ef1329
Compare
MichelleArk
previously approved these changes
Apr 10, 2026
6c831bb to
96eb75e
Compare
Base automatically changed from
qmalcolm--tidy-first-type-the-runners-part-2
to
main
April 10, 2026 17:14
GenericSqlRunner's result type (RemoteCompileResultMixin) lives in a separate hierarchy from NodeResult/RunResult, so it cannot satisfy the RunnerResultT bound on BaseRunner. Make GenericSqlRunner a standalone Generic[SQLResult] class with its own __init__, compile, safe_run, and exception handling — eliminating all 11 # type: ignore comments in sql.py. Also removes dead code in handle_exception: dbt.exceptions.Exception does not exist, making the isinstance branch an AttributeError at runtime. The REVIEW comment already flagged this; removing it now that the method has explicit type annotations that surface the issue. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2ef1329 to
d1b67b0
Compare
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GenericSqlRunner's result type (RemoteCompileResultMixin) lives in a separate hierarchy fromNodeResult/RunResult, so it cannot satisfy theRunnerResultTbound onBaseRunner.GenericSqlRunnera standaloneGeneric[SQLResult]class with its own__init__,compile,safe_run, and exception handling — eliminating all 11# type: ignorecomments insql.py.handle_exception:dbt.exceptions.Exceptiondoes not exist, making theisinstancebranch anAttributeErrorat runtime. AREVIEWcomment already flagged this; removing it now that the method has explicit type annotations that surface the issue.Test plan
hatch run default:mypy core/dbt/passes (or ignore count decreases)hatch run default:pytest tests/unit/passes🤖 Generated with Claude Code