Avatar for the langchain-ai user
langchain-ai
langchain
BlogDocsChangelog

Performance History

Latest Results

fix(core): `_parse_google_docstring` mishandling continuation lines with colons (#35680) ## Description `_parse_google_docstring` incorrectly parses multi-line argument descriptions when a continuation line contains a colon. The continuation line is treated as a new argument definition instead of being appended to the current argument's description. ### Example ```python def search(query: str, top_k: int = 5) -> str: """Search the knowledge base. Args: query: The search query to use for finding things: important ones top_k: Number of results to return """ ``` **Before (broken):** The parser creates 3 args: `query`, `for finding things`, `top_k` **After (fixed):** The parser correctly creates 2 args: `query` (with full description including "for finding things: important ones"), `top_k` ### Root Cause The parser used `if ":" in line` to detect new argument lines without considering indentation. In Google-style docstrings, continuation lines have deeper indentation than argument definition lines. ### Fix Detect the base indentation level from the first argument line and treat any line with deeper indentation as a continuation of the current argument's description, regardless of whether it contains a colon. ## Issue Fixes #35679 ## Dependencies None. ## Testing Added 4 unit tests in `test_function_calling.py::TestParseGoogleDocstring`: - `test_continuation_line_with_colon` — the core bug scenario - `test_simple_args_still_work` — regression check for basic args - `test_continuation_line_without_colon` — multi-line descriptions without colons - `test_multiple_continuation_lines_with_colons` — multiple continuation lines each containing colons All tests pass locally with Python 3.12. --------- Co-authored-by: gambletan <ethanchang32@gmail.com> Co-authored-by: Mason Daugherty <github@mdrxy.com>
master
3 hours ago
cr
alvinttang:fix/parse-docstring-continuation-colon-v2
5 hours ago
release(langchain): 1.3.11
mdrxy/release-langchain-1-3-11
5 hours ago

Latest Branches

CodSpeed Performance Gauge
0%
fix(core): `_parse_google_docstring` mishandling continuation lines with colons#35680
15 hours ago
db7a398
alvinttang:fix/parse-docstring-continuation-colon-v2
CodSpeed Performance Gauge
0%
21 hours ago
463f5a1
mdrxy/release-langchain-1-3-11
CodSpeed Performance Gauge
0%
17 hours ago
e0abd63
mdrxy/core/bare-valueerror-messages
© 2026 CodSpeed Technology
Home Terms Privacy Docs