[project] name = "autoteam" version = "0.1.0" description = "ChatGPT Team 账号自动轮转管理工具" requires-python = ">=3.10" dependencies = [ "curl-cffi>=0.13.0", "fastapi>=0.135.3", "playwright>=1.40.0", "requests>=2.28.0", "rich>=14.3.4", "uvicorn[standard]>=0.44.0", "xvfbwrapper>=0.2.9; sys_platform == 'linux'", ] [project.scripts] autoteam = "autoteam.manager:main" [build-system] requires = ["hatchling"] build-backend = "hatchling.build" [tool.hatch.build.targets.wheel] packages = ["src/autoteam"] [dependency-groups] dev = [ "pre-commit>=4.5.1", "pytest>=8.4.2", "ruff>=0.15.10", ] [tool.pytest.ini_options] addopts = "-ra" # tests/static 是 SPEC-4 AST 守卫所在地,显式列入避免被未来 collect-only 误排除 testpaths = ["tests", "tests/static", "tests/unit", "tests/integration"] # --------------------------------------------------------------------------- # Ruff lint (SPEC-3 §6) - 仅启 F401/F811/F821 三条零误报规则 # --------------------------------------------------------------------------- [tool.ruff] target-version = "py310" line-length = 120 src = ["src", "tests"] [tool.ruff.lint] # F401: imported but unused (死 import) # F811: redefinition of unused (重复定义) # F821: undefined name (核心 — 抓 typo 类 ImportError) select = ["F401", "F811", "F821"] # 测试 / 文档 / 脚本豁免(可能含 docstring 示例 / 故意未定义符号) exclude = [ "tests/", "docs/", "scripts/", ".venv/", "build/", "dist/", ] [tool.ruff.lint.per-file-ignores] # __init__.py 允许 re-export "__init__.py" = ["F401"]