Create a minimal Dash app with a layout and one callback.
(**kwargs)
| 34 | |
| 35 | |
| 36 | def _make_app(**kwargs): |
| 37 | """Create a minimal Dash app with a layout and one callback.""" |
| 38 | app = Dash(__name__, **kwargs) |
| 39 | app.layout = html.Div( |
| 40 | [ |
| 41 | html.Div(id="my-input"), |
| 42 | html.Div(id="my-output"), |
| 43 | ] |
| 44 | ) |
| 45 | |
| 46 | @app.callback( |
| 47 | Output("my-output", "children"), |
| 48 | Input("my-input", "children"), |
| 49 | mcp_expose_docstring=True, |
| 50 | ) |
| 51 | def update_output(value): |
| 52 | """Test callback docstring.""" |
| 53 | return f"echo: {value}" |
| 54 | |
| 55 | return _setup_mcp(app) |
| 56 | |
| 57 | |
| 58 | def _tools_list(app): |
no test coverage detected
searching dependent graphs…