Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
118 lines (105 loc) · 3.3 KB
/
Copy pathpyproject.toml
File metadata and controls
118 lines (105 loc) · 3.3 KB
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
[project]
name = "ZenlessZoneZero-OneDragon"
version = "2.0.0"
description = "绝区零 一条龙 | 全自动 | 自动闪避 | 自动每日 | 自动空洞 | 支持手柄"
requires-python = ">=3.11.9,<3.12"
dependencies = [
"pyside6==6.11.1",
"pyside6-fluent-widgets==1.11.2",
"pyyaml==6.0.3",
"numpy==2.4.6",
"opencv-python==4.13.0.92",
"pyautogui==0.9.54",
"pynput==1.8.1",
"onnxruntime-directml==1.24.4",
"shapely==2.1.2",
"pyclipper==1.4.0",
"soundcard==0.4.6",
"librosa==0.11.0",
"gensim==4.4.0",
"pygit2==1.19.3",
"psutil==7.2.2",
# pywin32>=312 的 wheel 不再内置 mfc140u.dll,未装 VC++ 2015-2022 Redistributable (x64) 的机器
# import win32ui 会闪退(issue #2428);锁 <312 沿用 311(自带 pythonwin/mfc140u.dll)。等上游 build 313 修复后放开。
"pywin32<312",
"websocket-client==1.9.2",
]
[dependency-groups]
dev = [
"colorama==0.4.6",
"matplotlib==3.11.0",
"polib==1.2.0",
"pre-commit==4.6.0",
"pyinstaller==6.21.0",
"pytest>=8.4.1",
"pytest-asyncio>=1.4.0",
"ruff>=0.15.18",
"pyuac==0.0.3",
"mcp>=2.0.0,<3",
"uvicorn>=0.30.0",
"pyright>=1.1.411",
]
gamepad = [
"vgamepad==0.1.0",
]
[tool.uv]
package = false
cache-dir = "./.install/uv_cache"
environments = ["sys_platform == 'win32'"]
default-groups = []
# Ruff configuration
[tool.ruff]
extend-exclude = [
"deploy/module_manifest.py",
]
# Same as Black.
line-length = 88
indent-width = 4
# Assume Python 3.11
target-version = "py311"
[tool.ruff.lint]
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"C", # mccabe
"B", # bugbear
"UP", # pyupgrade
"SIM", # simplify
"TID", # tidy imports
]
ignore = ["RUF001", "RUF003"]
extend-ignore = [
"E501", # line too long - already handled by black style
"C901", # method too complex - need refactor
"SIM102", # nested if statements - maybe more clear to seperate conditions
]
[tool.ruff.format]
quote-style = "single"
# Like Black, indent with spaces, rather than tabs.
indent-style = "space"
# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false
# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"
# Pyright 配置:供 Claude Code 的 LSP 工具使用(经 `uv run pyright-langserver` 启动,
# 见 .claude/settings.json 的 lspServers;必须走 uv 方式,勿启用官方全局 pyright 插件)。
[tool.pyright]
include = ["src"]
exclude = [
"**/__pycache__",
".venv",
".debug",
".install",
"zzz-od-test",
]
extraPaths = ["src"] # src-layout + package=false:让 pyright 去 src/ 解析 one_dragon/zzz_od 等导入(同 PYTHONPATH=src 的根因)
# TODO(type-check): typeCheckingMode 暂 off——只用导航(定义/引用/符号),不刷类型诊断。
# 现有代码尚未 type-clean,后续随改造逐步提升 → basic → standard。
typeCheckingMode = "off"
# Pytest 配置:src-layout + package=false,让 pytest 自动把 src/ 加入 sys.path
# (取代 CI 的 PYTHONPATH=src env 和测试文件里手动的 sys.path.insert)
[tool.pytest.ini_options]
pythonpath = ["src"]