diff --git a/airflow/providers/amazon/aws/executors/batch/__init__.py b/airflow/providers/amazon/aws/executors/batch/__init__.py index 13a83393a9124b..07dd9b5fd757ad 100644 --- a/airflow/providers/amazon/aws/executors/batch/__init__.py +++ b/airflow/providers/amazon/aws/executors/batch/__init__.py @@ -14,3 +14,8 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. +from __future__ import annotations # Added by precommit hooks + +__all__ = ["AwsBatchExecutor"] + +from airflow.providers.amazon.aws.executors.batch.batch_executor import AwsBatchExecutor diff --git a/airflow/providers/amazon/aws/executors/ecs/__init__.py b/airflow/providers/amazon/aws/executors/ecs/__init__.py index 13a83393a9124b..a8ec64d84b3d97 100644 --- a/airflow/providers/amazon/aws/executors/ecs/__init__.py +++ b/airflow/providers/amazon/aws/executors/ecs/__init__.py @@ -14,3 +14,8 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. +from __future__ import annotations # Added by precommit hooks + +__all__ = ["AwsEcsExecutor"] + +from airflow.providers.amazon.aws.executors.ecs.ecs_executor import AwsEcsExecutor diff --git a/tests/providers/amazon/aws/executors/batch/test_batch_executor.py b/tests/providers/amazon/aws/executors/batch/test_batch_executor.py index e8ad0e4592cc1d..8a5773bdca90ac 100644 --- a/tests/providers/amazon/aws/executors/batch/test_batch_executor.py +++ b/tests/providers/amazon/aws/executors/batch/test_batch_executor.py @@ -834,3 +834,8 @@ def test_submit_job_kwargs_exec_config_overrides( final_run_task_kwargs = executor._submit_job_kwargs(mock_ti_key, command, "queue", exec_config) assert final_run_task_kwargs == expected_result + + def test_short_import_path(self): + from airflow.providers.amazon.aws.executors.batch import AwsBatchExecutor as AwsBatchExecutorShortPath + + assert AwsBatchExecutor is AwsBatchExecutorShortPath diff --git a/tests/providers/amazon/aws/executors/ecs/test_ecs_executor.py b/tests/providers/amazon/aws/executors/ecs/test_ecs_executor.py index 41104831621392..fd7bf6772620a3 100644 --- a/tests/providers/amazon/aws/executors/ecs/test_ecs_executor.py +++ b/tests/providers/amazon/aws/executors/ecs/test_ecs_executor.py @@ -1703,3 +1703,8 @@ def test_run_task_kwargs_exec_config_overrides( final_run_task_kwargs = executor._run_task_kwargs(mock_ti_key, command, "queue", exec_config) assert final_run_task_kwargs == expected_result + + def test_short_import_path(self): + from airflow.providers.amazon.aws.executors.ecs import AwsEcsExecutor as AwsEcsExecutorShortPath + + assert AwsEcsExecutor is AwsEcsExecutorShortPath