0

A very similar question is already asked here: Docstrings when nothing is returned

but I would like to ask the same question with Numpy Docstrings.

For example:

from typing import NoReturn

def stop() -> NoReturn:
    """

    Returns
    -------
    NoReturn
    """
    raise RuntimeError()

What is the most convenient way to write Numpy Docstring "no return" type?

Is it preferable using void or - or blank or maybe something else?

For your information nothing is detailed about this in https://numpydoc.readthedocs.io/en/latest/format.html#returns

Ankhas
  • 13
  • 6

1 Answers1

0

I would assume you just don't specify Returns, similar to how you don't use Yields if your function doesn't yield.

I tried looking for an example in the numpy source code but I didn't find one.

Viliam Vadocz
  • 136
  • 2
  • 5