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

Make raises sections consistent in docstrings #2313

Merged
merged 1 commit into from
Jun 4, 2024

Conversation

Wauplin
Copy link
Contributor

@Wauplin Wauplin commented Jun 4, 2024

Make all raises sections consistent in docstrings in huggingface_hub. Format looks like this:

    Raises:
        [`EnvironmentError`](https://docs.python.org/3/library/exceptions.html#EnvironmentError)
            If an upload failed for any reason
        [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError)
            If the server returns malformed responses
        [`HTTPError`](https://requests.readthedocs.io/en/latest/api/#requests.HTTPError)
            If the LFS batch endpoint returned an HTTP error.

Made after a report from @mfuntowicz on slack (private) that docs don't always looks good (hf_hub_download example)
image

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@Wauplin
Copy link
Contributor Author

Wauplin commented Jun 4, 2024

Copy link
Member

@mfuntowicz mfuntowicz left a comment

Choose a reason for hiding this comment

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

LGTM 👍🏻

@Wauplin
Copy link
Contributor Author

Wauplin commented Jun 4, 2024

Thanks for the reviews!

@Wauplin Wauplin merged commit 5be2ed4 into main Jun 4, 2024
15 of 16 checks passed
@Wauplin Wauplin deleted the consistent-raises-section branch June 4, 2024 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants