ephraimbuddy commented on a change in pull request #20482:
URL: https://github.com/apache/airflow/pull/20482#discussion_r774925502
##########
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:
See the error here when changed back
```
airflow/utils/timezone.py:213: error: Incompatible return value type (got
"datetime", expected
"Optional[DateTime]")
return v if v.tzinfo else make_aware(v)
^
Found 1 error in 1 file (checked 60 source files)
```
--
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]