mypy/PEP-484 annotations? #1393

surrealcristian opened this Issue Nov 17, 2016 · 4 comments


None yet

3 participants


Are you interested in add mypy/PEP-484 annotations to gunicorn?

tilgovi commented Dec 20, 2016

I have no objection. It's an accepted PEP after all! I cannot speak for everyone, though.

tilgovi commented Dec 23, 2016

If we do this, we should do it in the comment style so that we maintain Python 2 compatibility.

benoitc commented Dec 27, 2016

what would be the benefits for the project?

tilgovi commented Dec 27, 2016

It functions as a form of documentation and mypy/pytype/pylint either support it or have plans to. It may help contributors this way. It also might work to gently discourage confusing behavior like functions returning multiple types depending on the code path, which I find more error prone and difficult to reason about.

Mostly, I see it as having no negative effect at all, and maybe some gentle positives.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment