File size: 1,638 Bytes
a887578
 
 
 
 
 
90694b4
e849737
a887578
 
ac7dc69
e849737
168414d
a887578
 
 
 
 
 
 
 
 
 
 
dafca1d
 
 
 
3c6b003
dafca1d
 
3c6b003
 
 
d9d9e44
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
[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"]