113 lines
3.1 KiB
TOML
113 lines
3.1 KiB
TOML
|
|
[project]
|
|||
|
|
name = "acemcp"
|
|||
|
|
version = "0.1.3"
|
|||
|
|
description = "Add your description here"
|
|||
|
|
readme = "README.md"
|
|||
|
|
authors = [
|
|||
|
|
{ name = "wmymz", email = "wmymz@icloud.com" }
|
|||
|
|
]
|
|||
|
|
requires-python = ">=3.10"
|
|||
|
|
dependencies = [
|
|||
|
|
"dynaconf>=3.2.12",
|
|||
|
|
"loguru>=0.7.3",
|
|||
|
|
"mcp>=1.1.2",
|
|||
|
|
"httpx>=0.28.1",
|
|||
|
|
"fastapi>=0.115.6",
|
|||
|
|
"uvicorn[standard]>=0.34.0",
|
|||
|
|
"toml>=0.10.2",
|
|||
|
|
"websockets>=14.1",
|
|||
|
|
]
|
|||
|
|
|
|||
|
|
[project.scripts]
|
|||
|
|
acemcp = "acemcp:run"
|
|||
|
|
|
|||
|
|
[build-system]
|
|||
|
|
requires = ["uv_build>=0.9.0,<0.10.0"]
|
|||
|
|
build-backend = "uv_build"
|
|||
|
|
|
|||
|
|
[dependency-groups]
|
|||
|
|
dev = [
|
|||
|
|
"pip>=25.3",
|
|||
|
|
"pre-commit>=4.3.0",
|
|||
|
|
"ruff>=0.14.3",
|
|||
|
|
]
|
|||
|
|
|
|||
|
|
[tool.ruff]
|
|||
|
|
preview = true
|
|||
|
|
line-length = 336
|
|||
|
|
|
|||
|
|
[tool.ruff.lint]
|
|||
|
|
# pylint规则
|
|||
|
|
# https://pylint.pycqa.org/en/latest/user_guide/messages/messages_overview.html
|
|||
|
|
# pylint规则迁移至uv,某些规则不支持(部分属于pylint定制化规则,非标准)
|
|||
|
|
# https://github.com/astral-sh/ruff/issues/970
|
|||
|
|
# https://github.com/astral-sh/ruff/issues/1774
|
|||
|
|
# 基础规则集
|
|||
|
|
select = [
|
|||
|
|
"A", "ARG", "B", "C", "E", "F", "G", "G", "I", "ISC", "N", "PIE", "PLE", "Q", "R", "RET", "SLF", "T", "TID", "UP", "W",
|
|||
|
|
"PLW",
|
|||
|
|
"BLE",
|
|||
|
|
"TRY",
|
|||
|
|
"SIM",
|
|||
|
|
"S",
|
|||
|
|
"FIX",
|
|||
|
|
"PLC",
|
|||
|
|
"PLR",
|
|||
|
|
"D",
|
|||
|
|
]
|
|||
|
|
# 平台检测
|
|||
|
|
# pylint src --disable=import-error,no-member,line-too-long,broad-exception-caught,broad-exception-raised,logging-fstring-interpolation,too-many-positional-arguments,too-many-instance-attributes,too-many-arguments,too-many-locals,too-many-branches,too-many-statements,too-many-nested-blocks,raise-missing-from,singleton-comparison,too-few-public-methods,consider-iterating-dictionary,consider-using-set-comprehension,not-callable,logging-not-lazy,consider-using-f-string,invalid-name,too-many-public-methods,global-statement,unnecessary-pass,wildcard-import,consider-using-join,cell-var-from-loop,too-many-return-statements,import-outside-toplevel,bare-except,subprocess-run-check,consider-using-dict-items,too-many-boolean-expressions,too-many-lines
|
|||
|
|
|
|||
|
|
# 圈复杂度
|
|||
|
|
mccabe = { max-complexity = 17 }
|
|||
|
|
|
|||
|
|
ignore = [
|
|||
|
|
"BLE001",
|
|||
|
|
"S110",
|
|||
|
|
"PLW0603",
|
|||
|
|
"TRY300",
|
|||
|
|
"TRY004",
|
|||
|
|
"PLC0415",
|
|||
|
|
"TRY002",
|
|||
|
|
"PLC1901",
|
|||
|
|
"TRY003",
|
|||
|
|
"PLR0912",
|
|||
|
|
"S112",
|
|||
|
|
"PLR2004",
|
|||
|
|
"PLR0917",
|
|||
|
|
"PLR0913",
|
|||
|
|
"PLR1702",
|
|||
|
|
"PLR0914",
|
|||
|
|
"PLR0915",
|
|||
|
|
"PLR6301",
|
|||
|
|
"D101",
|
|||
|
|
"PLW2901",
|
|||
|
|
"PLC2701",
|
|||
|
|
"TRY301",
|
|||
|
|
"D205",
|
|||
|
|
"D203", # 和D211不能同时启用,这里选择忽略D203
|
|||
|
|
"D213", # 和D212不能同时启用,这里选择忽略D213
|
|||
|
|
"D107",
|
|||
|
|
"SIM108",
|
|||
|
|
"FIX002",
|
|||
|
|
"SIM105",
|
|||
|
|
"TRY401",
|
|||
|
|
"S501",
|
|||
|
|
"S324",
|
|||
|
|
"S104",
|
|||
|
|
]
|
|||
|
|
|
|||
|
|
[tool.ruff.lint.isort]
|
|||
|
|
# 导入分组顺序(默认:标准库 → 第三方库 → 本地库)
|
|||
|
|
section-order = [
|
|||
|
|
"standard-library", # 标准库(如 sys, os)
|
|||
|
|
"third-party", # 第三方库(如 pandas, requests)
|
|||
|
|
"first-party", # 本地项目导入
|
|||
|
|
"local-folder", # 同一目录下的本地导入
|
|||
|
|
]
|
|||
|
|
|
|||
|
|
# 允许在导入中使用别名(如 import pandas as pd)
|
|||
|
|
force-sort-within-sections = true
|
|||
|
|
split-on-trailing-comma = true # 多行导入时在末尾添加逗号
|
|||
|
|
force-wrap-aliases = true # 强制别名导入使用多行格式(如 import a as b 超过长度时换行)
|