acoustic-carpenter-78188
03/05/2026, 8:06 AMpyflyte run example.py greeting_length --greeting="hello"
@task()
def greeting_length(greeting: str):
"""A task the counts the length of a greeting."""
return len(greeting)
Screenshot 2025-01-05 at 8 57 25 PM
What changes were proposed in this pull request?
Add conditions check to throw an error if native_outputs have value but no output interface is specified
How was this patch tested?
Setup process
pyflyte run example.py greeting_length --greeting="hello"
@task()
def greeting_length(greeting: str):
"""A task the counts the length of a greeting."""
return len(greeting)
Screenshots
Screenshot 2025-01-05 at 8 58 41 PM
Check all the applicable boxes
• I updated the documentation accordingly.
• All new and existing tests passed.
• All commits are signed-off.
Related PRs
Docs link
Summary by Bito
Implementation of enhanced error handling for tasks with undefined/unspecified return types, introducing FlyteValueException for validation of native outputs. Added comprehensive test cases covering regular returns, optional types, and error scenarios. Enhanced test coverage for task return type handling mechanisms and improved validation in test files to prevent silent failures. Optimized exit_handler calls in VSCode and Jupyter environments for better type safety.
Unit tests added: True
Estimated effort to review (1-5, lower is better): 1
flyteorg/flytekitacoustic-carpenter-78188
03/05/2026, 8:06 AM