hterik commented on issue #19884:
URL: https://github.com/apache/airflow/issues/19884#issuecomment-982435429


   I don't think you have to rely on runtime type hints to provide such feature.
   
   As long as the types passed between tasks provide some kind of from_json and 
to_json functions, you can rely on normal mypy to provide the validation of 
`whats_a_baz(get_baz())` having correct return value vs input argument. Right 
now this is constrained by only allowing scalars or dicts to be returned from 
tasks. 
   Then inside airflow internals, the serialization (eg the *# could be 
inferred"* in example above) should be possible to do runtime without the type 
hints, by calling the from_json/to_json if the returned value has such 
functions. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to