[project] name = "kol-insight-backend" version = "0.1.0" description = "KOL Insight - KOL 数据查询与分析工具后端" requires-python = ">=3.11" dependencies = [ # Web Framework "fastapi>=0.104.0", "uvicorn[standard]>=0.24.0", # Database "sqlalchemy>=2.0.0", "asyncpg>=0.29.0", "alembic>=1.12.0", "greenlet>=3.0.0", # HTTP Client "httpx[socks]>=0.25.0", # Data Validation "pydantic>=2.0.0", "pydantic-settings>=2.0.0", # Excel Export "openpyxl>=3.1.0", # Environment "python-dotenv>=1.0.0", ] [dependency-groups] dev = [ "pytest>=7.4.0", "pytest-asyncio>=0.21.0", "pytest-cov>=4.1.0", "basedpyright>=1.20.0", "ruff>=0.8.0", ] [tool.pytest.ini_options] testpaths = ["tests"] asyncio_mode = "auto" asyncio_default_fixture_loop_scope = "function" addopts = "-v --cov=app --cov-report=html --cov-report=term-missing" [tool.basedpyright] typeCheckingMode = "basic" pythonVersion = "3.11" include = ["app"] exclude = [".venv", "**/__pycache__", "alembic", "tests"] extraPaths = ["app"] reportMissingTypeStubs = false reportUnknownMemberType = false reportUnknownArgumentType = false reportGeneralTypeIssues = false reportOptionalMemberAccess = "warning" [tool.ruff] line-length = 150 target-version = "py311" [tool.ruff.lint] select = [ "E", # pycodestyle 错误 "F", # Pyflakes 错误(未定义变量、未使用导入等) "B", # bugbear 安全警告 "I", # import 排序 ] ignore = ["E501"] [tool.ruff.lint.per-file-ignores] "!app/**" = ["E", "F", "B", "I"] [tool.ruff.format] quote-style = "double" indent-style = "space" line-ending = "auto"