jedcunningham commented on code in PR #40084:
URL: https://github.com/apache/airflow/pull/40084#discussion_r1637019887
##########
airflow/sensors/time_sensor.py:
##########
@@ -40,11 +40,11 @@ class TimeSensor(BaseSensorOperator):
"""
- def __init__(self, *, target_time: datetime.time, **kwargs) -> None:
+ def __init__(self, *, target_time, **kwargs):
Review Comment:
Why is typing here gone too?
##########
airflow/sensors/date_time.py:
##########
@@ -90,13 +90,5 @@ class DateTimeSensorAsync(DateTimeSensor):
def __init__(self, **kwargs) -> None:
super().__init__(**kwargs)
- def execute(self, context: Context) -> NoReturn:
- trigger = DateTimeTrigger(moment=timezone.parse(self.target_time))
- self.defer(
- trigger=trigger,
- method_name="execute_complete",
- )
-
- def execute_complete(self, context, event=None) -> None:
- """Execute when the trigger fires - returns immediately."""
- return None
+ def execute(self, context: Context):
Review Comment:
Why'd you get rid of the NoReturn typing?
--
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]