stubber.publish.helpers

This module provides a function to retrieve the docstring of a Python module.

Module Contents

Functions

get_module_docstring(→ Union[str, Any])

Retrieve the docstring of a Python module.

stubber.publish.helpers.get_module_docstring(fname: pathlib.Path) str | Any

Retrieve the docstring of a Python module.

Parameters:

fname (Path) – The path to the Python module file.

Returns:

The docstring of the Python module, or None if no docstring is found.

Return type:

Union[str, Any]