Update mypy configuration to include namespace packages

This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-03-26 21:24:17 -03:00
commit 16e91a00de
3 changed files with 8 additions and 2 deletions

View file

@ -32,7 +32,7 @@ format:
lint:
make install_backend
poetry run mypy src/backend
poetry run mypy --namespace-packages -p "langflow"
poetry run ruff . --fix
install_frontend:

View file

View file

@ -17,10 +17,11 @@ repository = "https://github.com/logspace-ai/langflow"
license = "MIT"
readme = "README.md"
keywords = ["nlp", "langchain", "openai", "gpt", "gui"]
packages = [{ include = "langflow" }]
packages = [{ include = "langflow" }, { include = "py.typed" }]
include = ["pyproject.toml", "README.md", "langflow/**/*"]
documentation = "https://docs.langflow.org"
[tool.poetry.scripts]
langflow-base = "langflow.__main__:main"
@ -106,6 +107,11 @@ filterwarnings = ["ignore::DeprecationWarning"]
log_cli = true
markers = ["async_test"]
[tool.mypy]
namespace_packages = true
mypy_path = "langflow"
ignore_missing_imports = true
[tool.ruff]
exclude = ["src/backend/langflow/alembic/*"]