You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dagster._core.errors.DagsterInvalidDefinitionError: Cannot annotate `context` parameter with type AssetExecutionContext.
`context` must be annotated with AssetExecutionContext, AssetCheckExecutionContext, OpExecutionContext, or left blank.
However, the method _validate_context_type_hint in dagster/_core/definitions/op_definition.py will always fail since params[0].annotation is a str, not a class, when using from __future__ import annotations.
What did you expect to happen?
I annotated my context with the correct type parameter, AssetExecutionContext, nonetheless I'm getting this exception
How to reproduce?
Just add a param context: AssetExecutionContext and add from __future__ import annotations (more powerful type annotations) at the top of the file
Dagster version
dagster, version 1.9.5
Deployment type
Local
Deployment details
No response
Additional information
No response
Message from the maintainers
Impacted by this issue? Give it a 👍! We factor engagement into prioritization.
The text was updated successfully, but these errors were encountered:
What's the issue?
I'm annotating my assets params with types as follows:
This leads to the following exception:
However, the method
_validate_context_type_hint
indagster/_core/definitions/op_definition.py
will always fail since params[0].annotation is a str, not a class, when usingfrom __future__ import annotations
.What did you expect to happen?
I annotated my context with the correct type parameter, AssetExecutionContext, nonetheless I'm getting this exception
How to reproduce?
Just add a param context: AssetExecutionContext and add
from __future__ import annotations
(more powerful type annotations) at the top of the fileDagster version
dagster, version 1.9.5
Deployment type
Local
Deployment details
No response
Additional information
No response
Message from the maintainers
Impacted by this issue? Give it a 👍! We factor engagement into prioritization.
The text was updated successfully, but these errors were encountered: