PythonCharmers / python-future

Easy, clean, reliable Python 2/3 compatibility
http://python-future.org
MIT License
1.17k stars 291 forks source link

Add pyi stubs for better static analysis #490

Open chadrik opened 5 years ago

chadrik commented 5 years ago

Hi, I've written pyi stub files for this project that I'd like to submit to the python typeshed, which is a collection of type data about the stdlib and third party packages that is used by static type analyzers like mypy and PyCharm. As per their instructions, I need written sign off from the author in order to contribute these.

As an alternative to adding the stubs to the typeshed, they can be added to the project and released through the normal distutils mechanism: https://www.python.org/dev/peps/pep-0561/

Related to #257

Thanks!

jmadler commented 4 years ago

Thanks for doing this! All else being equal, I would prefer the type hints are colocated with the code itself. Could you submit a patch to include this information in the project?

I'll include it in a release in the next few days.