You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/12/31 17:09:13 UTC

[GitHub] [airflow] potiuk commented on a change in pull request #20613: Fix MyPy issues in ``airflow/macros``

potiuk commented on a change in pull request #20613:
URL: https://github.com/apache/airflow/pull/20613#discussion_r777035164



##########
File path: airflow/macros/__init__.py
##########
@@ -19,12 +19,15 @@
 import uuid  # noqa
 from datetime import datetime, timedelta
 from random import random  # noqa
-from typing import Any, Optional
+from typing import TYPE_CHECKING, Any, Optional
 
 import dateutil  # noqa
 
 from airflow.macros import hive  # noqa
 
+if TYPE_CHECKING:

Review comment:
       Why type checking ? Should not we just import it as usual? i think it has no performance penalty (DateTime will be imported by the time it reaches here).




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org