Skip to content

Commit 66889e2

Browse files
authored
style(langchain): drop target-version = py39 (#33288)
1 parent 6ea03ab commit 66889e2

File tree

173 files changed

+1261
-1353
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

173 files changed

+1261
-1353
lines changed

libs/langchain/langchain_classic/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import warnings
44
from importlib import metadata
5-
from typing import Any, Optional
5+
from typing import Any
66

77
from langchain_core._api.deprecation import surface_langchain_deprecation_warnings
88

@@ -14,7 +14,7 @@
1414
del metadata # optional, avoids polluting the results of dir(__package__)
1515

1616

17-
def _warn_on_import(name: str, replacement: Optional[str] = None) -> None:
17+
def _warn_on_import(name: str, replacement: str | None = None) -> None:
1818
"""Warn on import of deprecated module."""
1919
from langchain_classic._api.interactive_env import is_interactive_env
2020

libs/langchain/langchain_classic/_api/module_import.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import importlib
2-
from typing import Any, Callable, Optional
2+
from collections.abc import Callable
3+
from typing import Any
34

45
from langchain_core._api import internal, warn_deprecated
56

@@ -15,9 +16,9 @@
1516
def create_importer(
1617
package: str,
1718
*,
18-
module_lookup: Optional[dict[str, str]] = None,
19-
deprecated_lookups: Optional[dict[str, str]] = None,
20-
fallback_module: Optional[str] = None,
19+
module_lookup: dict[str, str] | None = None,
20+
deprecated_lookups: dict[str, str] | None = None,
21+
fallback_module: str | None = None,
2122
) -> Callable[[str], Any]:
2223
"""Create a function that helps retrieve objects from their new locations.
2324

0 commit comments

Comments
 (0)