google / atheris

Apache License 2.0
1.4k stars 112 forks source link

Type hints #83

Open radarhere opened 5 months ago

radarhere commented 5 months ago

Hi. Just wondering what it would take to add a PEP 561 py.typed file to this project?

I see you have some type hints already. Would you welcome pull requests to improve upon this? Does atheris aim to continue supporting Python 3.6, or can that be updated now that 3.6 is EOL? Would a py.typed file be acceptable once pytype passes?

radarhere commented 4 months ago

I created https://github.com/google/atheris/pull/86 to test the waters, and then https://github.com/google/atheris/pull/87 to add most of the remaining type hints. However, that has yet to be reviewed.

If you are just taking your time to get to it, no problem. However, if you think that it would be better for me to create stubs through https://github.com/python/typeshed, let me know.

radarhere commented 3 months ago

I've created https://github.com/python/typeshed/pull/12462

radarhere commented 2 months ago

The typeshed issue has now been merged, so https://pypi.org/project/types-atheris/ now exists.

Avasam commented 3 weeks ago

Note to maintainers here: the existence of types-atheris does not invalidate this issue! It would be better for type annotations to come from first-party.