Standard for documentation types
See original GitHub issueTell us about it
Documentation uses numpydoc
and is linted using pydocstyle
. However, the format of the type is not checked. Specifically, densityplot.py now uses proper type hinting, while everywhere else uses a less rigorous style emulating other pydata projects (int, optional
, instead of Optional[int]
, for example)
I am most in favor of consistency across the code base, which would suggest changing densityplot.py. I would also prefer type hinting everywhere to our current standard.
Specifically: I think we should manually urge new contributions to match current documentation practices, but I would also accept a pull request that converts a reasonable portion of the codebase to the new style.
Thoughts on implementation
My feelings on this are weak enough that I do not think it should be in CONTRIBUTING.md, since every requirement there feels like a hurdle to engagement. If we ended up in a place with type hinting everywhere, then I would be in favor of adding it.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (7 by maintainers)
mypy
is to be used in the code itself, not in the docstrings. See example below.@OriolAbril So, we have to extend the contribution guide about new links suggested by @canyon289 . This can also be added to the new PR template being added. Also, are you suggesting to change all docstrings to
mypy
format?