forked from LmeSzinc/AzurLaneAutoScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
105 lines (100 loc) · 3.92 KB
/
Copy pathpyproject.toml
File metadata and controls
105 lines (100 loc) · 3.92 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
[project]
name = "alas"
version = "1.0.0"
description = "AzurLaneAutoScript (Alas)"
requires-python = ">=3.12"
license = { text = "GPL-3.0" }
dependencies = [
# Image processing
"numpy>=2.4,<3",
"scipy>=1.10",
"pillow>=9.5",
"opencv-python>=4.12,<5",
"imageio",
# OCR (onnxruntime backend, models converted from self-trained mxnet checkpoints)
"onnxruntime>=1.20",
# Device connection
"adbutils==0.11.0",
"uiautomator2==2.16.17",
"uiautomator2cache==0.3.0.1",
"lz4",
"av>=10",
"psutil>=5.9",
# adbutils imports pkg_resources at runtime; keep setuptools installed
# (dropped in the uv migration, fresh installs crashed on import).
# pkg_resources was removed in setuptools 81+, so pin below it.
"setuptools>=65,<81",
# Utils
"rich>=11",
"tqdm",
"jellyfish>=0.11.2",
"pyyaml",
"inflection",
"pydantic>=2.10,<3",
"loguru>=0.7.3",
"requests>=2.31",
# Pushing
"onepush==1.4.0",
"pypresence==4.2.1",
# Webui
"starlette>=0.40",
"uvicorn>=0.49",
"websockets>=12",
"fastapi>=0.135",
"decorator>=5.3.1",
]
[dependency-groups]
dev = [
"httpx>=0.28.1",
"pyright>=1.1.411",
"pytest>=8.4",
"rope>=1.1.1",
"ruff>=0.5",
]
[tool.ruff]
target-version = "py313"
line-length = 120
extend-exclude = [
# NOTE: bare patterns match same-named dirs at any depth (gitignore
# semantics; leading-slash anchoring is not honored by ruff's resolver),
# so module/config, module/campaign and module/submodule are also
# excluded from `ruff check .`. Lint them explicitly once cleaned:
# ruff check module/config module/campaign module/submodule
"config",
"campaign", # generated map configs (F401-dominated, cleaned by generator later)
"submodule", # vendored third-party bridges (AlasFpyBridge, Maa runtime checkouts)
]
[tool.ruff.lint]
select = ["E", "F", "W", "B", "UP", "I", "ASYNC", "SIM", "PT", "C4", "RUF"]
ignore = [
"E501", # line too long, handled by line-length convention in legacy code
"E402", # module level import not at top of file
"F405", # name may be undefined from star import: every star import site is
# annotated `# noqa: F403 (data-bundle star import | re-export facade)`
# (169 sites, see dev_tools/annotate_star_imports.py); the 2787 usage
# sites of those intentional bundles cannot be annotated one by one,
# and real undefined names are caught by pyright + import smoke tests.
"B905", # zip without strict, py<3.10 compatibility in legacy code
"B904", # raise-without-from: per-site exception chaining intent needs manual review
"RUF001", # ambiguous unicode in strings: game text/names are intentional
"RUF002", # ambiguous unicode in docstrings: game text/names are intentional
"RUF003", # ambiguous unicode in comments: game text/names are intentional
"RUF012", # mutable class defaults: established legacy pattern (class-level caches)
"SIM102", # collapsible-if: style-only refactor on game logic, no behavioral value
"SIM103", # needless-bool: style-only refactor on game logic, no behavioral value
"SIM108", # if-else-block-instead-of-if-exp: style-only refactor, no behavioral value
"UP031", # %-formatting -> f-string: churn on legacy code, deferred
"F811", # redefined-while-unused: established override idiom in task classes
]
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-ra"
filterwarnings = [
# websockets 14.x deprecates the legacy client API used by
# module/device/method/minitouch.py (WebSocketClientProtocol /
# ConnectionClosedError / connect). The warning fires at import time
# from the library itself; the head-on fix is migrating the minitouch
# WebSocket client to the new asyncio API, which is device-layer work
# (stage 5) requiring real-emulator touch regression.
"ignore:websockets.*deprecated.*:DeprecationWarning",
]