-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpyproject.toml
112 lines (97 loc) · 2.38 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
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
[tool.poetry]
package-mode = false
[tool.poetry.dependencies]
python = "^3.10"
#
asyncpg = "0.30.0"
httpx = { extras = ["http2"], version = "0.28.1" }
jinja2 = "3.1.5"
sslog = "0.0.0a51"
litestar = { version = "2.13.0", extras = ['jinja'] }
redis = { extras = ["hiredis"], version = "5.2.1" }
uvicorn = { version = "0.34.0" }
bgm-tv-wiki = "0.0.29"
pyyaml = "6.0.2"
msgspec = "0.19.0"
google-re2 = "1.1.20240702"
# speedup litestar
fast-query-parsers = "1.0.3"
# speedup uvicorn
httptools = "0.6.4"
uvloop = { version = '0.21.0', platform = 'linux' }
anyio = '4.7.0'
[tool.poetry.group.dev.dependencies]
mypy = "1.14.1"
pytest = "8.3.4"
pre-commit = "4.0.1"
asyncpg-stubs = "0.30.0"
types-redis = "^4.6.0.20240806"
types-pyyaml = "^6.0.12.20240917"
google-re2-stubs = "0.1.1"
[tool.black]
extend-exclude = 'common'
line-length = 100
[tool.ruff]
cache-dir = ".venv/.cache/ruff"
line-length = 100
target-version = 'py310'
exclude = ['dist', '.venv', 'common']
[tool.ruff.format]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint]
select = ['ALL']
#extend-select = ["I", 'PLE', 'E402', 'PLR0402', 'UP', 'F401', 'TID252', 'DTZ']
unfixable = ['F841']
ignore = [
"A001", "A002",
"ANN",
"ARG001", "ARG002",
"C",
"COM",
"CPY001",
"D100", "D101", "D103", "D107", "D102", "D104", "D105", "D415",
"DOC201", "DOC501",
"E501",
"EM",
"ERA001",
"FBT",
"INP001",
"ISC001",
"N815", "N818",
"PERF401",
"PD",
"PGH003",
"PLR0911", "PLR0912", "PLR0913", "PLR0914", "PLR0915", "PLR0917", "PLR2004", "PLR6104", "PLR6301",
"PLW2901",
"PTH",
"PYI041",
"RET503", "RET504",
"RSE102",
"RUF001", "RUF003", "RUF029",
"S101", "S608",
"SIM102", "SIM108", "SIM110", "SIM117",
"T20",
"TCH001", "TCH002", "TCH003",
"TRY002", "TRY003", "TRY201", "TRY300",
"UP027", "UP027", "UP032",
"FLY002", "SIM103",
]
[tool.ruff.lint.per-file-ignores]
"scripts/*" = ['N999']
[tool.ruff.lint.flake8-tidy-imports]
# Disallow all relative imports.
ban-relative-imports = "all"
[tool.ruff.lint.isort]
#length-sort = true
lines-after-imports = 2
known-first-party = ["lint", "bgm", "server", "config"]
[tool.mypy]
strict = true
warn_no_return = false
check_untyped_defs = true
warn_return_any = false
explicit_package_bases = true
exclude = ['tests']
[tool.pytest.ini_options]
python_files = ['tests/**.py', 'test_*.py', '*_test.py']