Skip to content

docs: Fixed docstring indentation for documentation #37739

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

Closed
wants to merge 1 commit into from

Conversation

frgfm
Copy link
Contributor

@frgfm frgfm commented May 3, 2020

Hello there,

I was going through the default initialization of some layers, and ended up on the torch.nn.init documentation. As shown below, there was a slight issue with the docstrings of both kaiming_normal_ and kaiming_uniform_ that yielded a wrong list of function parameters:

doc_issue

This PR fixes the indentation in the corresponding docstrings.

Any feedback is welcome!

Multi-line argument descriptions were not properly indented, which yielded a wrong parameter listing in documentation
@frgfm frgfm requested a review from apaszke as a code owner May 3, 2020 19:32
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@ngimel has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@ngimel merged this pull request in 847d102.

ShawnZhong pushed a commit to ShawnZhong/pytorch that referenced this pull request May 5, 2020
Summary:
Hello there,

I was going through the default initialization of some layers, and ended up on the `torch.nn.init` documentation. As shown below, there was a slight issue with the docstrings of both `kaiming_normal_` and `kaiming_uniform_` that yielded a wrong list of function parameters:

![doc_issue](https://user-images.githubusercontent.com/26927750/80923512-88e30400-8d84-11ea-8708-36ed3a0f7749.png)

This PR fixes the indentation in the corresponding docstrings.

Any feedback is welcome!
Pull Request resolved: pytorch#37739

Differential Revision: D21393728

Pulled By: ngimel

fbshipit-source-id: 64523cb328e72d2e51c2c42b20a4545c1ec5f478
@frgfm frgfm deleted the init-doc-fix branch May 5, 2020 08:03
bharatr21 pushed a commit to bharatr21/pytorch that referenced this pull request May 5, 2020
Summary:
Hello there,

I was going through the default initialization of some layers, and ended up on the `torch.nn.init` documentation. As shown below, there was a slight issue with the docstrings of both `kaiming_normal_` and `kaiming_uniform_` that yielded a wrong list of function parameters:

![doc_issue](https://user-images.githubusercontent.com/26927750/80923512-88e30400-8d84-11ea-8708-36ed3a0f7749.png)

This PR fixes the indentation in the corresponding docstrings.

Any feedback is welcome!
Pull Request resolved: pytorch#37739

Differential Revision: D21393728

Pulled By: ngimel

fbshipit-source-id: 64523cb328e72d2e51c2c42b20a4545c1ec5f478
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.

5 participants