Skip to content

Document type hints individually #2282

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

Merged
merged 1 commit into from
Aug 31, 2023
Merged

Conversation

pquentin
Copy link
Member

The bulk() method used to be documented with an unreadable list of types in the signature:

image

Now types are listed for each parameter specifically:

image

Which is much easier to read.

Copy link
Contributor

@szabosteve szabosteve left a comment

Choose a reason for hiding this comment

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

Great improvement, LGTM!

@joshdevins
Copy link
Member

joshdevins commented Aug 29, 2023

Hey @pquentin This is a good improvement! Can we elide the optional arguments in the method signature? If you look at the Elasticsearch client constructor, it's still a really long list of arguments. Same with search.

Copy link
Member

@JoshMock JoshMock left a comment

Choose a reason for hiding this comment

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

Very nice. 👏

@pquentin
Copy link
Member Author

@joshdevins I looked at available Sphinx autodoc parameters but did not find anything that would allow us to do that: https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html, sorry.

@pquentin pquentin merged commit 915bbd7 into elastic:main Aug 31, 2023
@pquentin pquentin deleted the autodoc-typehints branch November 6, 2024 04:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants