lint: use pep 604 union syntax and pep 585 generic syntax (#4963)

* new union syntax

* fix test

* second round of conversions by injecting future annotations

* format + add top level makefile
This commit is contained in:
Sydney Runkle
2025-06-04 21:50:16 -04:00
committed by GitHub
parent 494c8ef0d2
commit 5e7566f4a3
66 changed files with 1671 additions and 1588 deletions
@@ -1,6 +1,8 @@
from __future__ import annotations
import json
from collections.abc import Sequence
from typing import Any, Optional
from typing import Any
from langchain_core.runnables import RunnableConfig
@@ -52,9 +54,9 @@ def _metadata_predicate(
def search_where(
config: Optional[RunnableConfig],
filter: Optional[dict[str, Any]],
before: Optional[RunnableConfig] = None,
config: RunnableConfig | None,
filter: dict[str, Any] | None,
before: RunnableConfig | None = None,
) -> tuple[str, Sequence[Any]]:
"""Return WHERE clause predicates for (a)search() given metadata filter
and `before` config.