amcraig opened a new issue, #56990:
URL: https://github.com/apache/airflow/issues/56990

   ### Apache Airflow version
   
   3.1.0
   
   ### If "Other Airflow 2/3 version" selected, which one?
   
   This also occurs in 2.11
   
   ### What happened?
   
   This drives me nuts, Pylance doesn't seem to be able to pick up correct 
stubs/typing for Airflow.
   Ruff doesn't have issues with the code.
   
   I have ensured VSCode is using the correct PythonPath for my Airflow project.
   
   Common issues include: 
   
   - XCom typing between Tasks
   - ObjectStoragePath and UPath type differences 
   - DAG operators `>>` are flagged as not being supported for the tasks
   - Complains about unused values in DAG definitions
   
   Is there anything I can do to alleviate this, or am I faced with just 
ignoring/turning off my linter for Airflow development?
   
   Here's an example DAG which throws Pylance linting error:
   
   <img width="872" height="826" alt="Image" 
src="https://github.com/user-attachments/assets/1a0a6558-c1af-4110-8731-33136507d1da";
 />
   
   ### What you think should happen instead?
   
   I'd expect that Airflow should work nicely with Pylance/Pyright.
   
   ### How to reproduce
   
   Just create a simple DAG like the one in the screenshot provided using 
ObjectStorage.
   An easy linting error is to reproduce is to return a ObjectStoragePath from 
one task and consume that same ObjectStoragePath in the next task.
   The Type of the ObjectStoragePath seems to be lost after passing through 
XComs
   
   ### Operating System
   
   MacOS
   
   ### Versions of Apache Airflow Providers
   
   apache-airflow-providers-google==18.0.0
   apache-airflow-providers-standard==1.8.0
   
   ### Deployment
   
   Virtualenv installation
   
   ### Deployment details
   
   This is just experienced in local dev
   
   ### 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to