Skip to content

Commit

Permalink
final pyright
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiedemaria committed Oct 26, 2023
1 parent 0e32fef commit 0a53756
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions docs/content/concepts/io-management/io-managers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -848,8 +848,9 @@ class DataframeTableIOManagerWithMetadata(ConfigurableIOManager):
context.add_output_metadata({"num_rows": len(obj), "table_name": table_name})

def load_input(self, context: InputContext):
table_name = context.upstream_output.name
return read_dataframe_from_table(name=table_name)
if context.upstream_output:
table_name = context.upstream_output.name
return read_dataframe_from_table(name=table_name)
```

Any entries yielded this way will be attached to the `Handled Output` event for this output.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,9 @@ def handle_output(self, context: OutputContext, obj):
context.add_output_metadata({"num_rows": len(obj), "table_name": table_name})

def load_input(self, context: InputContext):
table_name = context.upstream_output.name
return read_dataframe_from_table(name=table_name)
if context.upstream_output:
table_name = context.upstream_output.name
return read_dataframe_from_table(name=table_name)


# end_metadata_marker
Expand Down

0 comments on commit 0a53756

Please sign in to comment.