Taragolis commented on code in PR #33780: URL: https://github.com/apache/airflow/pull/33780#discussion_r1306493188
########## 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: I don't think there is any beneficial to put datetime from stdlib under type-checking ########## tests/providers/amazon/aws/operators/test_sagemaker_pipeline.py: ########## @@ -30,6 +30,9 @@ ) from airflow.providers.amazon.aws.triggers.sagemaker import SageMakerPipelineTrigger +if TYPE_CHECKING: + from unittest.mock import MagicMock Review Comment: The same valid here `from unittest import mock` should also load Magic as well as `@mock.patch.object(SageMakerHook, "start_pipeline")` -- 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]
