mirror of
https://github.com/hwchase17/langchain.git
synced 2026-06-09 10:17:00 +00:00
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:
committed by
GitHub
parent
cb0d227d8a
commit
ecd19ff71f
@@ -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())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user