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

Type annotations for top-level functions #1372

Open
jeromekelleher opened this issue Jan 16, 2021 · 4 comments
Open

Type annotations for top-level functions #1372

jeromekelleher opened this issue Jan 16, 2021 · 4 comments
Milestone

Comments

@jeromekelleher
Copy link
Member

#1371 added some type annotations for data classes. We should also annotate the top-level functions, as much as we can (some will be a little convoluted).

Also add some documentation on type annotations to the developer docs, noting where we are at and where we'd like to be in the future (basically, all new code should aim to be fully annotated).

@jeromekelleher
Copy link
Member Author

Dropping this for 1.0, it's not worth the extra effort.

@benjeffery
Copy link
Member

benjeffery commented Mar 15, 2021

Auto-detecting the types from the test suite worked well when I tried it out on tskit, something worth considering here.

@jeromekelleher
Copy link
Member Author

Do you have some links for software for this @benjeffery? It would be nice to do, in the near future, it's just not worth holding up 1.0 for.

@benjeffery
Copy link
Member

it's just not worth holding up 1.0 for.

Agreed!

https://github.com/dropbox/pyannotate, https://github.com/google/pytype and https://github.com/Instagram/MonkeyType are the projects in this space. A year ago I had success with the first, but things may have moved on.

@jeromekelleher jeromekelleher modified the milestones: 1.2.0, 1.3.0 Feb 23, 2022
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

2 participants