Skip to content

Commit

Permalink
Fix typing for artifact schemas (#10443)
Browse files Browse the repository at this point in the history
  • Loading branch information
nakamichiworks authored Jul 24, 2024
1 parent cd90d44 commit e1621eb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changes/unreleased/Fixes-20240714-100254.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Fixes
body: Fix typing for artifact schemas
time: 2024-07-14T10:02:54.452099+09:00
custom:
Author: nakamichiworks
Issue: "10442"
5 changes: 4 additions & 1 deletion core/dbt/artifacts/schemas/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,11 @@ def __post_serialize__(self, dct: Dict, context: Optional[Dict] = None):
# remote-compile-result
# remote-execution-result
# remote-run-result
S = TypeVar("S", bound="VersionedSchema")


def schema_version(name: str, version: int):
def inner(cls: Type[VersionedSchema]):
def inner(cls: Type[S]):
cls.dbt_schema_version = SchemaVersion(
name=name,
version=version,
Expand Down

0 comments on commit e1621eb

Please sign in to comment.