potiuk commented on PR #27946:
URL: https://github.com/apache/airflow/pull/27946#issuecomment-1328950788

   > But the idea made me think - maybe we can do something a bit different. 
Maybe instead of generating the api file we could generate the .pyi files and 
let the Mypy checks to the verifications for us. I will explore this one.
   
   Hmm. The `--include-private` flag does not really work (and it is far too 
broad). 
   
    I think we could be able to add some post-processing of the stub files to 
include the _private stuff that `could be used`. Let me see if I can implement 
it easily. I think it should be possible to just add some hard-coded 
replacements. I really like the idea that the "API" specification will be 
standard `.pyi` files, rather than our proprietary format.
   
   MyPy actually does even better job than our rudimentary check in this case, 
It actually detected that we also have another case that we should handle 
(which is enough of a justification for me to really bend it to our will):
   
   
![image](https://user-images.githubusercontent.com/595491/204271808-9eb84042-2ee2-46f7-9220-23fb94564c18.png)
   
   I just have to make sure to surface the information to the comon.sql 
contributor that those issues should be treated somehow differently and add 
smarter generation of the stubs - rather than outright generating, them, we can 
run them to a separate folder, compare and then decide what to do.
   
   
   
   
   


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