You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "ampx-mg (via GitHub)" <gi...@apache.org> on 2024/05/09 08:00:58 UTC

[I] mypy errors - Argument 1 has incompatible type "XComArg" [airflow]

ampx-mg opened a new issue, #39514:
URL: https://github.com/apache/airflow/issues/39514

   ### Apache Airflow version
   
   Other Airflow 2 version (please specify below)
   
   ### If "Other Airflow 2 version" selected, which one?
   
   2.8.1
   
   ### What happened?
   
   Ever since upgrading to 2.8.1. from 2.7.3. we are experiencing a number of mypy errors regarding arg types, mainly
   ```
   error: Argument 1 has incompatible type "XComArg"; expected "dict[Any, Any]"  [arg-type]
   ```
   We use TaskFlow API and define the task dependencies exactly as in the example tutorial taskflow dag
   ```
   order_data = extract()
   order_summary = transform(order_data)
   load(order_summary["total_order_value"])
   ```
   and haven't changed anything else in our DAG definitions.
   
   ### What you think should happen instead?
   
   No such errors should be raised, as was the case in 2.7.3.
   
   ### How to reproduce
   
   Run mypy on the tutorial taskflow DAG https://github.com/apache/airflow/blob/main/airflow/example_dags/tutorial_taskflow_api.py module
   
   ### Operating System
   
   Ubuntu 22.04
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Official Apache Airflow Helm Chart
   
   ### Deployment details
   
   _No response_
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
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.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] mypy errors - Argument 1 has incompatible type "XComArg" [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on issue #39514:
URL: https://github.com/apache/airflow/issues/39514#issuecomment-2560841718

   Closed as duplicate.


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


Re: [I] mypy errors - Argument 1 has incompatible type "XComArg" [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on issue #39514:
URL: https://github.com/apache/airflow/issues/39514#issuecomment-2259009056

   Yeah. Duplicate. 


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


Re: [I] mypy errors - Argument 1 has incompatible type "XComArg" [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk closed issue #39514: mypy errors - Argument 1 has incompatible type "XComArg"
URL: https://github.com/apache/airflow/issues/39514


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


Re: [I] mypy errors - Argument 1 has incompatible type "XComArg" [airflow]

Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal commented on issue #39514:
URL: https://github.com/apache/airflow/issues/39514#issuecomment-2111593512

   > This was solved by #26023 but that code was moved under the `dev` directory by #28498. AFAIK the code from that directory isn't included in any kind of public release.
   > 
   > FWIW there are 2 workaround. You could copy that code into your own Airflow repo or just use `cast` on the operator as it's passed into the task method.
   
   We have a task about mypy plugin
   https://github.com/apache/airflow/issues/38796


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


Re: [I] mypy errors - Argument 1 has incompatible type "XComArg" [airflow]

Posted by "jonathan-ostrander (via GitHub)" <gi...@apache.org>.
jonathan-ostrander commented on issue #39514:
URL: https://github.com/apache/airflow/issues/39514#issuecomment-2108281294

   This was solved by https://github.com/apache/airflow/pull/26023 but that code was moved under the `dev` directory by https://github.com/apache/airflow/pull/28498. AFAIK the code from that directory isn't included in any kind of public release.
   
   FWIW there are 2 workaround. You could copy that code into your own Airflow repo or just use `cast` on the operator as it's passed into the task method.


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