diff --git a/libs/cli/langchain_cli/namespaces/serve.py b/libs/cli/langchain_cli/namespaces/serve.py index 7f14ede6b45..abbc965c9f5 100644 --- a/libs/cli/langchain_cli/namespaces/serve.py +++ b/libs/cli/langchain_cli/namespaces/serve.py @@ -3,7 +3,7 @@ Manage LangServe application projects. """ import typer -from typing import Optional, List, Tuple, Dict +from typing import Optional, List from typing_extensions import Annotated from pathlib import Path import shutil @@ -12,13 +12,11 @@ from langchain_cli.utils.git import ( copy_repo, update_repo, parse_dependency_string, - DependencySource, ) from langchain_cli.utils.packages import get_package_root from langchain_cli.utils.events import create_events from langserve.packages import list_packages, get_langserve_export import tomli -from collections import defaultdict REPO_DIR = Path(typer.get_app_dir("langchain")) / "git_repos" @@ -99,7 +97,6 @@ def add( if dependencies is None: dependencies = [] - method = "" # cannot have both repo and dependencies if len(repo) != 0: if len(dependencies) != 0: diff --git a/libs/cli/langchain_cli/utils/git.py b/libs/cli/langchain_cli/utils/git.py index a39458246ef..ba16b94d3a7 100644 --- a/libs/cli/langchain_cli/utils/git.py +++ b/libs/cli/langchain_cli/utils/git.py @@ -69,7 +69,7 @@ def parse_dependency_string(package_string: str) -> DependencySource: # it's a default git repo dependency subdirectory = str(Path(DEFAULT_GIT_SUBDIRECTORY) / package_string) return DependencySource( - git=gitstring, ref=DEFAULT_GIT_REF, subdirectory=subdirectory + git=DEFAULT_GIT_REPO, ref=DEFAULT_GIT_REF, subdirectory=subdirectory ) diff --git a/libs/cli/pyproject.toml b/libs/cli/pyproject.toml index a57a6de0de9..8e7f64ec5d3 100644 --- a/libs/cli/pyproject.toml +++ b/libs/cli/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "langchain-cli" -version = "0.0.4" +version = "0.0.5" description = "CLI for interacting with LangChain" authors = ["Erick Friis "] readme = "README.md" @@ -27,6 +27,7 @@ pytest-watch = "^4.2.0" [tool.poe.tasks] test = "poetry run pytest" watch = "poetry run ptw" +lint = "poetry run ruff ." [build-system]