Skip to content

Docstring cleanup: "default None", doi#1828

Merged
kandersolar merged 29 commits into
pvlib:mainfrom
echedey-ls:refactor-docstring-params-2
Dec 12, 2023
Merged

Docstring cleanup: "default None", doi#1828
kandersolar merged 29 commits into
pvlib:mainfrom
echedey-ls:refactor-docstring-params-2

Conversation

@echedey-ls
Copy link
Copy Markdown
Member

@echedey-ls echedey-ls commented Aug 4, 2023

  • Closes "default None" in docstring parameter descriptions considered harmful #1574 . All changes at the bottom.
  • I am familiar with the contributing guidelines
  • [ ] Tests added
  • [ ] Updates entries in docs/sphinx/source/reference for API changes.
  • [ ] Adds description and name entries in the appropriate "what's new" file in docs/sphinx/source/whatsnew for all changes. Includes link to the GitHub Issue with :issue:`num` or this Pull Request with :pull:`num`. Includes contributor name and/or GitHub username (link with :ghuser:`user`).
  • Current code includes numpydoc compliant docstrings, examples, and comments everywhere.
  • Pull request is nearly complete and ready for detailed review.
  • Maintainer: Appropriate GitHub Labels (including remote-data) and Milestone are assigned to the Pull Request and linked Issue.

Cherry-picked commits from #1790 and repeated the process with the regexes, with little changes to them.

Changes in this PR

  1. Changes excessive use of parentheses in defaults
    return_components: bool (optional, default=False) -> return_components : bool, default False
  2. default None -> optional ("default None" in docstring parameter descriptions considered harmful #1574)
  3. If None -> If not specified
  4. Inexistent DOI roles are now roles, e. g.: DOI: 10... -> :doi:`10...`

Loading
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.

"default None" in docstring parameter descriptions considered harmful

3 participants