You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "hussein-awala (via GitHub)" <gi...@apache.org> on 2023/08/26 20:03:31 UTC
[GitHub] [airflow] hussein-awala commented on a diff in pull request #33780: Improve modules import in AWS probvider by move some of them into a type-checking block
hussein-awala commented on code in PR #33780:
URL: https://github.com/apache/airflow/pull/33780#discussion_r1306560132
##########
airflow/providers/amazon/aws/hooks/ecr.py:
##########
@@ -20,11 +20,14 @@
import base64
import logging
from dataclasses import dataclass
-from datetime import datetime
+from typing import TYPE_CHECKING
from airflow.providers.amazon.aws.hooks.base_aws import AwsBaseHook
from airflow.utils.log.secrets_masker import mask_secret
+if TYPE_CHECKING:
+ from datetime import datetime
Review Comment:
yes, but I will add a pre-commit to check if the imported methods/classes are used in runtime or just for type checking, so if we want to keep it we will need to add an ignore annotation
--
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