From f3d44aca3431b8407e86226175aa465e2f08525e Mon Sep 17 00:00:00 2001 From: BalzaniEdoardo Date: Thu, 12 Dec 2024 15:35:30 -0500 Subject: [PATCH] linted --- src/nemos/_documentation_utils/_myst_nb_glue.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/nemos/_documentation_utils/_myst_nb_glue.py b/src/nemos/_documentation_utils/_myst_nb_glue.py index 5c1afc38..bdbe1139 100644 --- a/src/nemos/_documentation_utils/_myst_nb_glue.py +++ b/src/nemos/_documentation_utils/_myst_nb_glue.py @@ -1,4 +1,19 @@ -"""overwrite string repr for gluing string variable outputs.""" +""" +Utilities for capturing and gluing function outputs for interactive documentation. + +This module provides tools to enhance documentation workflows by enabling the capture +of print outputs and source code from Python functions. These outputs can then be +formatted and embedded into Jupyter Notebooks or static documentation using the +`myst-nb` glue functionality. + +## Main Features: +- `capture_print`: A decorator to capture print statements from a function and return them alongside the function's + output. +- `extract_body_exclude_def_and_return`: A utility to extract and format the body of a function, excluding its + definition and return statement. +- `FormattedString`: A helper class to wrap and format text for use with the glue functionality. + +""" import inspect import textwrap