Dev-iL commented on code in PR #53791: URL: https://github.com/apache/airflow/pull/53791#discussion_r2243364222
########## providers/standard/tests/unit/standard/sensors/test_python.py: ########## @@ -24,10 +24,15 @@ from airflow.exceptions import AirflowSensorTimeout from airflow.providers.standard.sensors.python import PythonSensor -from airflow.sensors.base import PokeReturnValue +from tests_common.test_utils.version_compat import AIRFLOW_V_3_1_PLUS from unit.standard.operators.test_python import BasePythonTest +if AIRFLOW_V_3_1_PLUS: + from airflow.sdk.bases.sensor import PokeReturnValue +else: + from airflow.sensors.base import PokeReturnValue # type: ignore[no-redef] Review Comment: When do you recommend try/except and when a conditional import? -- 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]
