Skip to content

Commit 58aa1ea

Browse files
fix type hints
1 parent 60cbf22 commit 58aa1ea

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

python_modules/libraries/dagster-dbt/dagster_dbt/cloud_v2/cli_invocation.py

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
from collections.abc import Iterator, Mapping, Sequence
22
from typing import Any, Optional, Union
33

4-
from dagster import AssetCheckEvaluation, AssetExecutionContext, AssetMaterialization, Output
4+
from dagster import (
5+
AssetCheckEvaluation,
6+
AssetCheckResult,
7+
AssetExecutionContext,
8+
AssetMaterialization,
9+
Output,
10+
)
511
from dagster._annotations import preview
612
from dagster._record import record
713

@@ -46,7 +52,9 @@ def run(
4652
context=context,
4753
)
4854

49-
def wait(self) -> Iterator[Union[AssetMaterialization, AssetCheckEvaluation, Output]]:
55+
def wait(
56+
self,
57+
) -> Iterator[Union[AssetCheckEvaluation, AssetCheckResult, AssetMaterialization, Output]]:
5058
self.run_handler.wait_for_success()
5159
if "run_results.json" not in self.run_handler.list_run_artifacts():
5260
return

python_modules/libraries/dagster-dbt/dagster_dbt/cloud_v2/run_handler.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def to_default_asset_events(
9898
manifest: Mapping[str, Any],
9999
dagster_dbt_translator: Optional[DagsterDbtTranslator] = None,
100100
context: Optional[AssetExecutionContext] = None,
101-
) -> Iterator[Union[AssetMaterialization, AssetCheckEvaluation, Output]]:
101+
) -> Iterator[Union[AssetCheckEvaluation, AssetCheckResult, AssetMaterialization, Output]]:
102102
"""Convert the run results of a dbt Cloud job run to a set of corresponding Dagster events.
103103
104104
Args:
@@ -109,12 +109,12 @@ def to_default_asset_events(
109109
context (Optional[AssetExecutionContext]): The execution context.
110110
111111
Returns:
112-
Iterator[Union[AssetMaterialization, AssetCheckEvaluation, Output]]:
112+
Iterator[Union[AssetCheckEvaluation, AssetCheckResult, AssetMaterialization, Output]]:
113113
A set of corresponding Dagster events.
114114
115115
In a Dagster asset definition, the following are yielded:
116116
- Output for refables (e.g. models, seeds, snapshots.)
117-
- AssetCheckEvaluation for dbt tests.
117+
- AssetCheckResult for dbt tests.
118118
119119
For ad hoc usage, the following are yielded:
120120
- AssetMaterialization for refables (e.g. models, seeds, snapshots.)

0 commit comments

Comments
 (0)