chore(langchain): activate mypy warn_return_any rule (#34549)

Co-authored-by: Mason Daugherty <github@mdrxy.com>
Co-authored-by: Mason Daugherty <mason@langchain.dev>
This commit is contained in:
Christophe Bornet
2026-01-10 04:46:25 +01:00
committed by GitHub
parent cb0d227d8a
commit ecd19ff71f
16 changed files with 135 additions and 125 deletions

View File

@@ -23,7 +23,7 @@ def remove_request_headers(request: Any) -> Any:
return request
def remove_response_headers(response: dict) -> dict:
def remove_response_headers(response: dict[str, Any]) -> dict[str, Any]:
"""Remove sensitive headers from the response."""
for k in response["headers"]:
response["headers"][k] = "**REDACTED**"
@@ -31,7 +31,7 @@ def remove_response_headers(response: dict) -> dict:
@pytest.fixture(scope="session")
def vcr_config() -> dict:
def vcr_config() -> dict[str, Any]:
"""Extend the default configuration coming from langchain_tests."""
config = base_vcr_config()
config.setdefault("filter_headers", []).extend(_EXTRA_HEADERS)
@@ -42,7 +42,7 @@ def vcr_config() -> dict:
return config
def pytest_recording_configure(config: dict, vcr: VCR) -> None: # noqa: ARG001
def pytest_recording_configure(config: dict[str, Any], vcr: VCR) -> None: # noqa: ARG001
vcr.register_persister(CustomPersister())
vcr.register_serializer("yaml.gz", CustomSerializer())