You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
It is not clear to me how to document a star parameter of a variadic function and whether the parameter name should be prefixed with *, \*, or nothing. This is particularly true in Sphinx style, but also applies to Google and NumPy styles to some extent (*args and **kwargs appear in an example, but it's not clear if that's the preferred or only syntax). This has caused confusion for linters, such as:
It appears that both no-prefix and backslash-star are accepted for Sphinx style, and that all three are accepted for Google and NumPy style (due to auto-escaping in sphinx.ext.napoleon as noted in peterjc/flake8-rst-docstrings#18 (comment) ). Is this correct? Are any styles preferred?
Describe the solution you'd like
I had checked for examples in both Describing code in Sphinx or The Python Domain. I'd recommend adding an example to both with the preferred style, and discussing other supported styles in The Python Domain.
Describe alternatives you've considered
Keeping the status quo is always an option. We can weigh the current ambiguity and confusion against the effort to write and maintain the docs.
Thanks for considering,
Kevin
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
It is not clear to me how to document a star parameter of a variadic function and whether the parameter name should be prefixed with *, \*, or nothing. This is particularly true in Sphinx style, but also applies to Google and NumPy styles to some extent (*args and **kwargs appear in an example, but it's not clear if that's the preferred or only syntax). This has caused confusion for linters, such as:
mising-param-doc
vsanomalous-backslash-in-string
pylint-dev/pylint#5406It appears that both no-prefix and backslash-star are accepted for Sphinx style, and that all three are accepted for Google and NumPy style (due to auto-escaping in sphinx.ext.napoleon as noted in peterjc/flake8-rst-docstrings#18 (comment) ). Is this correct? Are any styles preferred?
Describe the solution you'd like
I had checked for examples in both Describing code in Sphinx or The Python Domain. I'd recommend adding an example to both with the preferred style, and discussing other supported styles in The Python Domain.
Describe alternatives you've considered
Keeping the status quo is always an option. We can weigh the current ambiguity and confusion against the effort to write and maintain the docs.
Thanks for considering,
Kevin
The text was updated successfully, but these errors were encountered: