mirror of
https://github.com/hwchase17/langchain.git
synced 2025-07-31 08:32:32 +00:00
cli[patch]: Fix Tuple typing problem when create new langchain app (#19141)
Thank you for contributing to LangChain! When run command langchain app new my-app, i get this error: File "/home/mauricio/.local/lib/python3.8/site-packages/langchain_cli/utils/pyproject.py", line 15, in <module> pyproject_toml: Path, local_editable_dependencies: Iterable[tuple[str, Path]] TypeError: 'type' object is not subscriptable This PR fix the error.
This commit is contained in:
parent
6c9b0f96f3
commit
fb9ce95184
@ -1,5 +1,5 @@
|
||||
from pathlib import Path
|
||||
from typing import Any, Dict, Iterable
|
||||
from typing import Any, Dict, Iterable, Tuple
|
||||
|
||||
from tomlkit import dump, inline_table, load
|
||||
from tomlkit.items import InlineTable
|
||||
@ -12,7 +12,7 @@ def _get_dep_inline_table(path: Path) -> InlineTable:
|
||||
|
||||
|
||||
def add_dependencies_to_pyproject_toml(
|
||||
pyproject_toml: Path, local_editable_dependencies: Iterable[tuple[str, Path]]
|
||||
pyproject_toml: Path, local_editable_dependencies: Iterable[Tuple[str, Path]]
|
||||
) -> None:
|
||||
"""Add dependencies to pyproject.toml."""
|
||||
with open(pyproject_toml, encoding="utf-8") as f:
|
||||
|
Loading…
Reference in New Issue
Block a user