Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PEP 484 type hinting to Populus #442

Open
paultiplady opened this issue Feb 20, 2018 · 0 comments
Open

Add PEP 484 type hinting to Populus #442

paultiplady opened this issue Feb 20, 2018 · 0 comments

Comments

@paultiplady
Copy link
Contributor

paultiplady commented Feb 20, 2018

Proposal/suggestion: add PEP 484 type hinting to Populus.

https://www.python.org/dev/peps/pep-0484/ specifies optional type hinting, which is supported by IDEs like PyCharm, and static checkers like mypy.

These type hints make development quicker for those who prefer to work in IDEs, and make it much easier for new developers to get up to speed on the class APIs.

I can just maintain stub files in my own workspace, but it seems like it might be useful to add these to the project.

There are a couple ways this can be done, the simplest is just adding a .pyi file for every .py file. I created a WIP here #441 to explore what this would look like.

Another possibility would be to keep the type hints out-of-tree, perhaps in https://github.com/python/typeshed or some other repo. That seems easier to lose in a refactor.

Any thoughts/preferences on how to proceed here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant