Skip to content

DOCS: Fix inconsistencies in existing parameter docstrings #995

@asoplata

Description

@asoplata

This issue consists of three efforts:

  1. There are some cases where the order or presence of parameters in the docstring is inconsistent with the order of parameters in the function itself, such as https://github.com/jonescompneurolab/hnn-core/blob/master/hnn_core/viz.py#L81-L121 . All docstrings should be updated to be accurate with respect to the argument order in every function.
  2. For parameters which have a default value, but their default is different than None, these optional parameters should have , default=<value> added to the end of the parameter's first line in the docstring. As an example, this
    color : tuple of float | str
        RGBA value to use for plotting. By default, 'k' (black)

should become

    color : tuple of float | str, default='k'
        RGBA value to use for plotting. By default, 'k' (black)

since this implies both that the parameter is optional, and that it has a specific default value. This is in agreement with https://numpydoc.readthedocs.io/en/latest/format.html#parameters .

  1. For parameters whose default value is None, these parameters should have , optional added to the end of the parameter's first line in the docstring, in a similar manner to above.

Note that any amount of work for this is appreciated! Contributors should not feel like they have to fix every single instance of this issue before making a PR and contributing changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationDocumentation, example tutorials, and websitesgood first issueGood for newcomers

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions