-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpyproject.toml
82 lines (66 loc) · 1.97 KB
/
pyproject.toml
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
[project]
name = "star-rail-tools"
dynamic = ["version"]
description = "Honkai: Star Rail Toolkit"
authors = [{ name = "Charlie Brown", email = "cntvc@outlook.com" }]
maintainers = [{ name = "Charlie Brown", email = "cntvc@outlook.com" }]
readme = "README.md"
license = { text = "GPL-3.0-only" }
requires-python = ">=3.11,<3.13" # # pyinstaller requires ">=3.11,<3.13"
dependencies = [
"loguru>=0.7.3",
"pydantic>=2.10.4",
"aiohttp>=3.11.11",
"aiosqlite>=0.20.0",
"xlsxwriter>=3.2.0",
"textual>=1.0.0",
]
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
# PDM ====================================================================================
[tool.pdm]
distribution = true
[tool.pdm.build]
includes = ["star_rail"]
[tool.pdm.version]
source = "file"
path = "star_rail/__init__.py"
[dependency-groups]
lint = ["ruff>=0.8.6", "pre-commit>=4.0.1"]
dev = ["textual-dev>=1.7.0"]
release = ["pyinstaller>=6.11.1"]
[tool.pdm.scripts]
lint = "pre-commit run --all-files"
release = "pyinstaller --clean ./build.spec --noconfirm"
# Ruff ================================================================================
[tool.ruff]
line-length = 100
fix = true
src = ["star_rail", "tests"]
[tool.ruff.format]
# Enable reformatting of code snippets in docstrings.
docstring-code-format = true
[tool.ruff.lint]
extend-select = [
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"W", # pycodestyle
"C90", # mccabe
]
extend-ignore = [
"B024", # Abstract base class has no abstract methods
"B028", # No explicit `stacklevel` keyword argument found
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = [
"F401", # unused import.
"F403", # cannot detect unused vars if we use starred import
"F405", # may be undefined, or defined from star imports
"E402", # module level import not at top of file
]
[tool.ruff.lint.isort]
known-first-party = ["star_rail"]
[tool.ruff.lint.mccabe]
max-complexity = 10