typeshed icon indicating copy to clipboard operation
typeshed copied to clipboard

Add Clang Stubfiles

Open Vizonex opened this issue 9 months ago • 3 comments

For the longest time using clang as been rather annoying on python 3 since the entire library lacks typehinting and I have been using clang for developing bindings as well as other CPython & Cython Related projects. I have already attempted to make a pull request to the python clang maintainers to add stub files with no avail or responses. So I thought moving this here would be a better temporary solution for the time being. Feel free to provide me with feedback if there's anything I need to change as I plan to add a few more in the future such as the third party library pyduktape2 which currently has had suffered from the same outcome.

Vizonex avatar May 03 '25 18:05 Vizonex

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

github-actions[bot] avatar May 03 '25 18:05 github-actions[bot]

Please note that you will need a stubs/clang/METADATA.toml file describing these stubs. See CONTRIBUTING.md for more information and the other METADATA.toml files in this repository for examples.

srittau avatar May 05 '25 13:05 srittau

Another build failure is due to the pyright strict config. This should be solved by adding stubs/clang to pyrightconfig.stricter.json's exclude key. There are also some mypy errors here:

https://github.com/python/typeshed/actions/runs/15101805593/job/42443806988?pr=13933

srittau avatar May 20 '25 09:05 srittau