Skip to content

Commit

Permalink
fix type annotation on output_name arg of Output (#23397)
Browse files Browse the repository at this point in the history
## Summary & Motivation

It's typed as `Optional`, but we runtime-check that it's not `None`.

## How I Tested These Changes
  • Loading branch information
sryza authored Aug 5, 2024
1 parent ee3f534 commit 497d7fb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions python_modules/dagster/dagster/_core/definitions/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,7 @@ class Output(Generic[T], EventWithMetadata):
Args:
value (Any): The value returned by the compute function.
output_name (Optional[str]): Name of the corresponding out. (default:
"result")
output_name (str): Name of the corresponding Out. (default: "result")
metadata (Optional[Dict[str, Union[str, float, int, MetadataValue]]]):
Arbitrary metadata about the output. Keys are displayed string labels, and values are
one of the following: string, float, int, JSON-serializable dict, JSON-serializable
Expand All @@ -121,7 +120,7 @@ class Output(Generic[T], EventWithMetadata):
def __init__(
self,
value: T,
output_name: Optional[str] = DEFAULT_OUTPUT,
output_name: str = DEFAULT_OUTPUT,
metadata: Optional[Mapping[str, RawMetadataValue]] = None,
data_version: Optional[DataVersion] = None,
*,
Expand Down

0 comments on commit 497d7fb

Please sign in to comment.