[build-system] requires = ["setuptools>=80.9.0"] build-backend = "setuptools.build_meta" [project] name = "MaiBot" version = "1.0.0" description = "MaiCore 是一个基于大语言模型的可交互智能体" requires-python = ">=3.10" dependencies = [ "Babel>=2.17.0", "aiohttp>=3.12.14", "certifi", "colorama>=0.4.6", "faiss-cpu>=1.11.0", "fastapi>=0.116.0", "google-genai>=1.39.1", "httpx", "jieba>=0.42.1", "json-repair>=0.47.6", "maim-message>=0.6.2", "maibot-plugin-sdk>=2.0.0", "msgpack>=1.1.2", "numpy>=2.2.6", "openai>=1.95.0", "pandas>=2.3.1", "pillow>=11.3.0", "pyarrow>=20.0.0", "pydantic>=2.11.7", "pypinyin>=0.54.0", "python-dotenv>=1.1.1", "python-multipart>=0.0.20", "python-levenshtein", "quick-algo>=0.1.4", "rich>=14.0.0", "scipy>=1.7.0", "sqlalchemy>=2.0.40", "sqlmodel>=0.0.24", "structlog>=25.4.0", "tomlkit>=0.13.3", "typing-extensions", "uvicorn>=0.35.0", "watchfiles>=1.1.1", ] [dependency-groups] dev = [ "pytest", "pytest-asyncio", "ruff>=0.12.2", "zstandard", ] [tool.uv] index-url = "https://pypi.tuna.tsinghua.edu.cn/simple" [tool.ruff] include = ["*.py"] # 行长度设置 line-length = 120 [tool.ruff.lint] fixable = ["ALL"] unfixable = [] # 如果一个变量的名称以下划线开头,即使它未被使用,也不应该被视为错误或警告。 dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" # 启用的规则 select = [ "E", # pycodestyle 错误 "F", # pyflakes "B", # flake8-bugbear ] ignore = ["E711", "E501"] [tool.ruff.format] docstring-code-format = true indent-style = "space" # 使用双引号表示字符串 quote-style = "double" # 尊重魔法尾随逗号 # 例如: # items = [ # "apple", # "banana", # "cherry", # ] skip-magic-trailing-comma = false # 自动检测合适的换行符 line-ending = "auto"