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 annotation guidelines #7050

Open
Illviljan opened this issue Sep 18, 2022 · 2 comments
Open

Type annotation guidelines #7050

Illviljan opened this issue Sep 18, 2022 · 2 comments

Comments

@Illviljan
Copy link
Contributor

Illviljan commented Sep 18, 2022

Dask has a pretty nice guideline for type hinting, see dask/community#255.

Notable for us is to avoid adding typing in docstrings to avoid duplicating information.

@Illviljan Illviljan added needs triage Issue that has not been reviewed by xarray team member topic-typing and removed needs triage Issue that has not been reviewed by xarray team member labels Sep 18, 2022
@headtr1ck
Copy link
Collaborator

How exactly does it work with the automatic types in the docstring?

@benbovy
Copy link
Member

benbovy commented Sep 21, 2022

How exactly does it work with the automatic types in the docstring?

Yes, what I really like in the html API documentation is the types (and especially the hyperlinks!) next to each name in the parameter list. Does napoleon support generating those links automatically from the typed signature?

Screenshot 2022-09-21 at 13 00 04

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

No branches or pull requests

4 participants