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

Consistently document argument and return types using type annotations #250

Closed
pvandyken opened this issue Feb 17, 2023 · 0 comments · Fixed by #277
Closed

Consistently document argument and return types using type annotations #250

pvandyken opened this issue Feb 17, 2023 · 0 comments · Fixed by #277
Labels
documentation Improvements or additions to documentation

Comments

@pvandyken
Copy link
Contributor

This is related to #249, and will be partially solved by its completion. Right now we have a mixture of type documentation in the docstring and as type annotations. Sphinx handles type annotations just fine, so we should eliminate all docstring type annotations in there favour. This will help limit code duplication and developer burden (already I think some of the docstring annotations are out of date).

On the same token, we need to explicitly annotate the return type func() -> type: ... for all public functions. This isn't necessary for pyright, but it is necessary for sphinx autodoc. It's also probably a good practice for public endpoints, to make sure we don't accidentally change the return type of functions we don't consume internally (on the chance our test suite doesn't cover them).

@pvandyken pvandyken added the documentation Improvements or additions to documentation label Feb 17, 2023
@pvandyken pvandyken linked a pull request Mar 26, 2023 that will close this issue
@pvandyken pvandyken removed a link to a pull request Mar 26, 2023
@tkkuehn tkkuehn linked a pull request Apr 25, 2023 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant