We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
def get_task(task_id): """ Get a task object Args: task_id: numeric ID of task Returns: Task: """
See above
Don't emit the empty section
(private)
No response
Mac, Linux/Container
3.10
latest
autodoc, intersphinx, todo, viewcode, napoleon, sphinx_inline_tabs, prettyspecialmethods
The text was updated successfully, but these errors were encountered:
I noticed this a while back and never bothered to report it as I just monkey patched a fix for this.
def _parse_returns_section(self: napoleon.NumpyDocstring, section: str) -> list[str]: fields = self._consume_returns_section() multi = len(fields) > 1 use_rtype = False if multi else self._config.napoleon_use_rtype lines = [] for _name, _type, _desc in fields: if use_rtype: field = self._format_field(_name, "", _desc) else: field = self._format_field(_name, _type, _desc) if multi: if lines: lines.extend(self._format_block(" * ", field)) else: lines.extend(self._format_block(":returns: * ", field)) else: if any(field): # only add :returns: if there's something to say lines.extend(self._format_block(":returns: ", field)) if _type and use_rtype: lines.extend([f":rtype: {_type}", ""]) if lines and lines[-1]: lines.append("") return lines
this was my solution to it atleast.
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Describe the bug
How to Reproduce
See above
Expected behavior
Don't emit the empty section
Your project
(private)
Screenshots
No response
OS
Mac, Linux/Container
Python version
3.10
Sphinx version
latest
Sphinx extensions
autodoc, intersphinx, todo, viewcode, napoleon, sphinx_inline_tabs, prettyspecialmethods
Extra tools
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: