mingshi-wang commented on pull request #20547:
URL: https://github.com/apache/airflow/pull/20547#issuecomment-1002770040


   > > A not-so-ideal way is to declare a dynamic return type:
   > > def poke(self, context: Context) -> Union[bool, 'PokeReturnValue']:
   > 
   > That's not enough. The problem is that any sensor that uses 
PokeReturnValue would have to be Airlfow 2.3+ only (PokeReturnValue will fail 
to be imported for such sensor)
   
   You are right - what I can think of is to introduce a new type of sensor, 
e.x RichSensor and make the poke() method return a PokeReturnValue type.


-- 
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