amoghrajesh commented on code in PR #58223:
URL: https://github.com/apache/airflow/pull/58223#discussion_r2517597603


##########
task-sdk/src/airflow/sdk/definitions/dag.py:
##########
@@ -67,12 +67,12 @@
     from pendulum.tz.timezone import FixedTimezone, Timezone
 
     from airflow.models.taskinstance import TaskInstance as 
SchedulerTaskInstance
+    from airflow.sdk.definitions._internal.typing_compat import Self

Review Comment:
   Unfortunately mypy ends up complaining
   ```shell script
     task-sdk/src/airflow/sdk/execution_time/supervisor.py:134: error: Module 
"typing" has no attribute "Self"  [attr-defined]
             from typing import Self
             ^~~~~~~~~~~~~~~~~~~~~~~
     task-sdk/src/airflow/sdk/execution_time/supervisor.py:134: note: Use `from 
typing_extensions import Self` instead
     task-sdk/src/airflow/sdk/execution_time/supervisor.py:134: note: See 
https://mypy.readthedocs.io/en/stable/runtime_troubles.html#using-new-additions-to-the-typing-module
     task-sdk/src/airflow/sdk/bases/operator.py:88: error: Module "typing" has 
no attribute "Self"  [attr-defined]
             from typing import Self
             ^~~~~~~~~~~~~~~~~~~~~~~
     task-sdk/src/airflow/sdk/bases/operator.py:88: note: Use `from 
typing_extensions import Self` instead
     task-sdk/src/airflow/sdk/bases/operator.py:88: note: See 
https://mypy.readthedocs.io/en/stable/runtime_troubles.html#using-new-additions-to-the-typing-module
     task-sdk/src/airflow/sdk/definitions/dag.py:65: error: Module "typing" has 
no attribute "Self"  [attr-defined]
             from typing import Self, TypeAlias
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     task-sdk/src/airflow/sdk/definitions/dag.py:65: note: Use `from 
typing_extensions import Self` instead
     task-sdk/src/airflow/sdk/definitions/dag.py:65: note: See 
https://mypy.readthedocs.io/en/stable/runtime_troubles.html#using-new-additions-to-the-typing-module
     task-sdk/src/airflow/sdk/definitions/asset/decorators.py:31: error: Module 
"typing" has no attribute "Self"  [attr-defined]
             from typing import Self
             ^~~~~~~~~~~~~~~~~~~~~~~
     task-sdk/src/airflow/sdk/definitions/asset/decorators.py:31: note: Use 
`from typing_extensions import Self` instead
     task-sdk/src/airflow/sdk/definitions/asset/decorators.py:31: note: See 
https://mypy.readthedocs.io/en/stable/runtime_troubles.html#using-new-additions-to-the-typing-module
     task-sdk/src/airflow/sdk/execution_time/context.py:47: error: Module 
"typing" has no attribute "Self"  [attr-defined]
             from typing import Self
             ^~~~~~~~~~~~~~~~~~~~~~~
     task-sdk/src/airflow/sdk/execution_time/context.py:47: note: Use `from 
typing_extensions import Self` instead
     task-sdk/src/airflow/sdk/execution_time/context.py:47: note: See 
https://mypy.readthedocs.io/en/stable/runtime_troubles.html#using-new-additions-to-the-typing-module
   ```



-- 
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]

Reply via email to