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

Hide typehints in API documentation #41

Merged
merged 1 commit into from
Mar 7, 2024

Conversation

cgohlke
Copy link
Member

@cgohlke cgohlke commented Mar 7, 2024

Description

This PR proposes to remove type annotations/hints from the autogenerated API documentation using the autodoc_typehints setting.

Typehints can be distracting and are repeated in numpy docstrings anyways. If needed, the typehints are one click away in the [source] link. Here's a comparison of PhasorPlot.semicircle method with and without typehints:

image

image

Release note

Summarize the changes in the code block below to be included in the
release notes:

Hide typehints in API documentation

Checklist

  • The pull request title, summary, and description are concise.
  • Related issues are linked in the description.
  • New dependencies are explained.
  • The source code and documentation can be distributed under the MIT license.
  • The source code adheres to code standards.
  • New classes, functions, and features are thoroughly tested.
  • New, user-facing classes, functions, and features are documented.
  • New features are covered in tutorials.
  • No files other than source code, documentation, and project settings are added to the repository.

@cgohlke cgohlke self-assigned this Mar 7, 2024
@cgohlke cgohlke added the documentation Improvements or additions to documentation label Mar 7, 2024
Copy link
Contributor

@bruno-pannunzio bruno-pannunzio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks much cleaner and easier to understand. Great idea!

@cgohlke cgohlke merged commit d1f7d0b into phasorpy:main Mar 7, 2024
13 checks passed
@cgohlke cgohlke deleted the doc_api_no_types branch March 7, 2024 16:01
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 this pull request may close these issues.

2 participants