uranusjr commented on a change in pull request #20274:
URL: https://github.com/apache/airflow/pull/20274#discussion_r768316467
##########
File path: airflow/triggers/temporal.py
##########
@@ -38,7 +38,7 @@ def __init__(self, moment: datetime.datetime):
# Make sure it's in UTC
elif moment.tzinfo is None:
raise ValueError("You cannot pass naive datetimes")
- elif not hasattr(moment.tzinfo, "offset") or moment.tzinfo.offset != 0:
+ elif not hasattr(moment.tzinfo, "offset") or moment.tzinfo.offset !=
0: # type: ignore
Review comment:
This is good as-is, but this kind of calls are better written with
`getattr` instead. Since you’re accessing the value anyway, `getattr` has less
overhead, and Mypy automatically let it return `Any` to bypass checks.
--
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]