uranusjr commented on a change in pull request #20482:
URL: https://github.com/apache/airflow/pull/20482#discussion_r774917257



##########
File path: airflow/utils/timezone.py
##########
@@ -195,11 +201,11 @@ def coerce_datetime(v: None) -> None:
 
 
 @overload
-def coerce_datetime(v: dt.datetime) -> DateTime:
+def coerce_datetime(v: dt.datetime) -> dt.datetime:
     ...
 
 
-def coerce_datetime(v: Optional[dt.datetime]) -> Optional[DateTime]:
+def coerce_datetime(v: Optional[dt.datetime]) -> Optional[dt.datetime]:

Review comment:
       This shouldn’t be necessary; `coerce_datetime` always returns None or a 
`pendulum.DateTime`. Also I believe this will cause some errors to pop up 
elsewhere because there are functions expecting this to return a 
`pendulum.DateTime` specifically.




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