chore(langchain): activate mypy `warn_return_any`
by cbornet
·
Feb 06, 2026 at 19:31 UTC
·
scan-aa6a9c2b4de9f862
Get this automatically on every PR
Install the Axiomo GitHub App to get Signals as check runs and PR comments on every pull request.
Risk level: Medium (35%)
Activate mypy's `warn_return_any` to ensure type safety
Changes in return types in factory.py, shell_tool.py reflect mypy compliance
Return types added in middleware/types.py and structured_output.py
No functional tests or output validation in the diff
Trusted contributor with 398 merged PRs. maintains 129 public repositories. has 177 followers.
Review 1 high-priority file(s)
libs/langchain_v1/langchain/agents/middleware/types.py
+434
434 lines changed; Source code
libs/langchain_v1/langchain/agents/structured_output.py
+8
Source code
libs/langchain_v1/langchain/chat_models/base.py
+10
Source code
libs/langchain_v1/langchain/agents/factory.py
+6
Source code
libs/langchain_v1/langchain/agents/middleware/shell_tool.py
+2
Source code
libs/langchain_v1/pyproject.toml
+3
Configuration
63
minutes to review
high
effort level
none
staleness risk
Allocate focused review time
Good evidence, acceptable risk, ready for merge
Why is security_scan_clean missing? Consider adding this check.
Why is coverage_maintained missing? Consider adding this check.