Skip to content

chore(core): remove arg types from docstrings#33388

Merged
Mason Daugherty (mdrxy) merged 1 commit into
langchain-ai:masterfrom
cbornet:docstring-types
Oct 9, 2025
Merged

chore(core): remove arg types from docstrings#33388
Mason Daugherty (mdrxy) merged 1 commit into
langchain-ai:masterfrom
cbornet:docstring-types

Conversation

@cbornet
Copy link
Copy Markdown
Collaborator

@cbornet Christophe Bornet (cbornet) commented Oct 9, 2025

  • Remove types args
  • Remove types from Returns
  • Remove types from Yield
  • Replace kwargs by **kwargs when needed

@github-actions github-actions Bot added core `langchain-core` package issues & PRs infra PRs made that include chores, devops, repo meta changes labels Oct 9, 2025
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Oct 9, 2025

CodSpeed Performance Report

Merging #33388 will improve performances by 18.12%

Comparing cbornet:docstring-types (40d5a9f) with master (3576e69)

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

Summary

⚡ 8 improvements
✅ 5 untouched
⏩ 21 skipped1

Benchmarks breakdown

Mode Benchmark BASE HEAD Change
WallTime test_import_time[BaseChatModel] 562.5 ms 495.9 ms +13.44%
WallTime test_import_time[ChatPromptTemplate] 631 ms 564.3 ms +11.82%
WallTime test_import_time[Document] 231.8 ms 208.7 ms +11.07%
WallTime test_import_time[InMemoryVectorStore] 679.2 ms 590.8 ms +14.97%
WallTime test_import_time[LangChainTracer] 455.2 ms 412.1 ms +10.47%
WallTime test_import_time[PydanticOutputParser] 567.8 ms 507 ms +12.01%
WallTime test_import_time[RunnableLambda] 545.5 ms 461.8 ms +18.12%
WallTime test_import_time[Runnable] 514.1 ms 463.5 ms +10.92%

Footnotes

  1. 21 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@github-actions github-actions Bot added infra PRs made that include chores, devops, repo meta changes and removed infra PRs made that include chores, devops, repo meta changes labels Oct 9, 2025
Copy link
Copy Markdown
Member

@mdrxy Mason Daugherty (mdrxy) left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. We can also remove Defaults to None. or Defaults to x in all cases where the default is defined in the signature, but that can come in a future PR.

@mdrxy Mason Daugherty (mdrxy) merged commit f405a2c into langchain-ai:master Oct 9, 2025
69 checks passed
@cbornet Christophe Bornet (cbornet) deleted the docstring-types branch October 9, 2025 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core `langchain-core` package issues & PRs infra PRs made that include chores, devops, repo meta changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants