forked from cardosofelipe/fast-next-template
- Add type annotations for mypy compliance - Use UTC-aware datetimes consistently (datetime.now(UTC)) - Add type: ignore comments for LiteLLM incomplete stubs - Fix import ordering and formatting - Update pyproject.toml mypy configuration 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
105 lines
2.3 KiB
TOML
105 lines
2.3 KiB
TOML
[project]
|
|
name = "syndarix-mcp-llm-gateway"
|
|
version = "0.1.0"
|
|
description = "Syndarix LLM Gateway MCP Server - Unified LLM access with failover and cost tracking"
|
|
requires-python = ">=3.12"
|
|
dependencies = [
|
|
"fastmcp>=2.0.0",
|
|
"litellm>=1.50.0",
|
|
"redis>=5.0.0",
|
|
"pydantic>=2.0.0",
|
|
"pydantic-settings>=2.0.0",
|
|
"tiktoken>=0.7.0",
|
|
"httpx>=0.27.0",
|
|
"uvicorn>=0.30.0",
|
|
"fastapi>=0.115.0",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
dev = [
|
|
"pytest>=8.0.0",
|
|
"pytest-asyncio>=0.24.0",
|
|
"pytest-cov>=5.0.0",
|
|
"respx>=0.21.0",
|
|
"fakeredis>=2.25.0",
|
|
"ruff>=0.8.0",
|
|
"mypy>=1.11.0",
|
|
]
|
|
|
|
[project.scripts]
|
|
llm-gateway = "server:main"
|
|
|
|
[build-system]
|
|
requires = ["hatchling"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
packages = ["."]
|
|
exclude = ["tests/", "*.md", "Dockerfile"]
|
|
|
|
[tool.hatch.build.targets.sdist]
|
|
include = ["*.py", "pyproject.toml"]
|
|
|
|
[tool.ruff]
|
|
target-version = "py312"
|
|
line-length = 88
|
|
|
|
[tool.ruff.lint]
|
|
select = [
|
|
"E", # pycodestyle errors
|
|
"W", # pycodestyle warnings
|
|
"F", # pyflakes
|
|
"I", # isort
|
|
"B", # flake8-bugbear
|
|
"C4", # flake8-comprehensions
|
|
"UP", # pyupgrade
|
|
"ARG", # flake8-unused-arguments
|
|
"SIM", # flake8-simplify
|
|
]
|
|
ignore = [
|
|
"E501", # line too long (handled by formatter)
|
|
"B008", # do not perform function calls in argument defaults
|
|
"B904", # raise from in except (too noisy)
|
|
]
|
|
|
|
[tool.ruff.lint.isort]
|
|
known-first-party = ["config", "models", "exceptions", "providers", "failover", "routing", "cost_tracking", "streaming"]
|
|
|
|
[tool.pytest.ini_options]
|
|
asyncio_mode = "auto"
|
|
asyncio_default_fixture_loop_scope = "function"
|
|
testpaths = ["tests"]
|
|
addopts = "-v --tb=short"
|
|
filterwarnings = [
|
|
"ignore::DeprecationWarning",
|
|
]
|
|
|
|
[tool.coverage.run]
|
|
source = ["."]
|
|
omit = ["tests/*", "conftest.py"]
|
|
branch = true
|
|
|
|
[tool.coverage.report]
|
|
exclude_lines = [
|
|
"pragma: no cover",
|
|
"def __repr__",
|
|
"raise NotImplementedError",
|
|
"if TYPE_CHECKING:",
|
|
"if __name__ == .__main__.:",
|
|
]
|
|
fail_under = 90
|
|
show_missing = true
|
|
|
|
[tool.mypy]
|
|
python_version = "3.12"
|
|
warn_return_any = false
|
|
warn_unused_ignores = false
|
|
disallow_untyped_defs = true
|
|
ignore_missing_imports = true
|
|
plugins = ["pydantic.mypy"]
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = "tests.*"
|
|
disallow_untyped_defs = false
|
|
ignore_errors = true
|