mypy/PEP-484 annotations? #1393

Open
surrealcristian opened this Issue Nov 17, 2016 · 4 comments

Projects

None yet

3 participants

@surrealcristian

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

@tilgovi
Collaborator
tilgovi commented Dec 20, 2016

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

@tilgovi
Collaborator
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
Owner
benoitc commented Dec 27, 2016

what would be the benefits for the project?

@tilgovi
Collaborator
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