This repository has been archived by the owner on Feb 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
pyproject.toml
114 lines (102 loc) · 2.64 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
113
114
[project]
name = "herta-villa-sdk"
description = "大别野「黑塔」Python SDK"
authors = [
{name = "MingxuanGame", email = "MingxuanGame@outlook.com"},
]
dependencies = [
"aiohttp>=3.8.4",
"pydantic>=1.10.8,<2.0",
"rsa>=4.9",
]
requires-python = ">=3.8"
readme = "README.md"
license = {text = "MIT"}
keywords = ["mihoyo", "miyoushe", "bot", "villa"]
dynamic = ["version"]
[project.urls]
Homepage = "https://github.com/Herta-villa/Herta-villa-SDK"
Documentation = "https://github.com/Herta-villa/Herta-villa-SDK"
Repository = "https://github.com/Herta-villa/Herta-villa-SDK"
"Bug Tracker" = "https://github.com/Herta-villa/Herta-villa-SDK/issues"
[project.optional-dependencies]
fastapi = [
"fastapi>=0.100.0",
"uvicorn>=0.22.0",
]
ws = [
"protobuf>=4.25.1",
]
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
[tool.pdm]
version = { source = "file", path = "hertavilla/version.py" }
[tool.pdm.dev-dependencies]
dev = [
"ruff>=0.0.270",
"pre-commit>=3.3.2",
"black>=23.3.0",
"mypy-protobuf>=3.5.0",
"types-protobuf>=4.24.0.4",
]
test = [
"pytest>=7.4.0",
"pytest-asyncio>=0.21.0",
]
[tool.ruff]
exclude = ["hertavilla/ws/pb"]
line-length = 79
select = [
"E", "W", # pycodestyle
"F", # pyflakes
"I", # isort
"RUF", # ruff
"TRY", # tryceratops
# "D", # pydocstyle
# pylint
"PLW", # Warning
"PLR", # Refactor
"PLE", # Error
"PTH", # flake8-use-pathlib
"SLF", # flake8-self
"RET", # flake8-return
"RSE", # flake8-raise
"T20", # flake8-print
"PIE", # flake8-pie
"ISC", # flake8-implicit-str-concat
"C4", # flake8-comprehensions
"COM", # flake8-commas
"A", # flake8-builtins
"B", # flake8-bugbear
"ASYNC", # flake8-async
]
ignore = ["PLR0913", "TRY003"]
allowed-confusables = [",", "。", "(", ")", ";"]
[tool.ruff.isort]
force-sort-within-sections = true
extra-standard-library = ["typing_extensions"]
force-wrap-aliases = true
combine-as-imports = true
order-by-type = true
relative-imports-order = "closest-to-furthest"
required-imports = ["from __future__ import annotations"]
section-order = ["future", "standard-library", "first-party", "local-folder", "third-party"]
[tool.pdm.scripts]
lint = "ruff check ."
fix = "ruff check --fix ."
[tool.pyright]
reportShadowedImports = false
pythonVersion = "3.8"
pythonPlatform = "All"
executionEnvironments = [
{ root = "./" },
]
[tool.black]
extend-exclude = '''
hertavilla/ws/pb
'''
include = '\.pyi?$'
line-length = 79
skip-string-normalization = true
target-version = ["py38", "py39", "py310", "py311"]