dabla commented on code in PR #73928:
URL: https://github.com/apache/airflow/pull/73928#discussion_r4264626651


##########
providers/standard/src/airflow/providers/standard/sensors/date_time.py:
##########
@@ -89,8 +91,8 @@ class DateTimeSensorAsync(DateTimeSensor):
 
     :param target_time: datetime after which the job succeeds. (templated)
     :param start_from_trigger: Start the task directly from the triggerer 
without going into the worker.
-        Ignored when ``target_time`` is a Jinja template: templates are only 
rendered on the worker, so the
-        task defers from the worker instead.
+        It's ignored on Airflow < 3.3 when ``target_time`` is a Jinja template

Review Comment:
   **[nit]** Small docstring cleanup.
   
   The sentence has no full stop, and the blank line after it splits the 
`:param` list for no reason. Suggestion:
   
   ```rst
       :param start_from_trigger: Start the task directly from the triggerer 
without going into the worker.
           Ignored on Airflow < 3.3 when ``target_time`` is a Jinja template.
       :param trigger_kwargs: ...
   ```
   
   The blank line added after `super().__init__(**kwargs)` in 
`DateTimeSensor.__init__` (line 68) can go as well, since it is the only change 
to that class.



##########
providers/standard/tests/unit/standard/triggers/test_temporal.py:
##########
@@ -50,6 +55,37 @@ def test_input_validation_tz():
         DateTimeTrigger(moment)
 
 
+def test_input_target_time_validation_tz():
+    """
+    Tests that the DateTimeTrigger validates input to moment arg

Review Comment:
   **[nit]** This docstring was copied from the test above and describes the 
wrong thing.
   
   The test doesn't validate `moment`. It checks that `target_time` (a naive or 
aware `str` or `datetime`) resolves to the right UTC `moment`. Something like 
`test_target_time_resolves_to_utc_moment` with the docstring "`target_time` as 
a naive or aware string or datetime resolves to a UTC `moment`" would describe 
it.



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