docstrings
Class info¶
🛈 DocStrings¶
Credits to pydantic-ai.
_infer_docstring_style
¶
_infer_docstring_style(doc: str) -> DocstringStyle
Simplistic docstring style inference.
Source code in src/llmling_agent/utils/docstrings.py
61 62 63 64 65 66 67 68 69 70 71 |
|
get_docstring_info
¶
get_docstring_info(
func: AnyCallable, sig: Signature, *, docstring_format: DocstringFormat = "auto"
) -> tuple[str, dict[str, str]]
Extract the fn description and parameter descriptions from a fn's docstring.
Returns:
Type | Description |
---|---|
tuple[str, dict[str, str]]
|
A tuple of (main function description, parameter descriptions). |
Source code in src/llmling_agent/utils/docstrings.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
|