-
Notifications
You must be signed in to change notification settings - Fork 1
/
pyproject.toml
219 lines (196 loc) · 4.67 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
[build-system]
requires = ["pdm-backend", "gitpython>=3.1.43"]
build-backend = "pdm.backend"
[project]
name = "asyncord"
description = "A smart and powerful base for creating discord bots and interaction with the API."
authors = [{ name = "Vadim Suharnikov", email = "[email protected]" }]
urls = { homepage = "https://github.com/suharnikov/asyncord", repository = "https://github.com/suharnikov/asyncord" }
readme = "README.rst"
license = { text = "MIT" }
requires-python = ">=3.12.0"
dependencies = [
"yarl>=1.8.1",
"rich>=12.5.1",
"pydantic>=2.4.2",
"aiohttp<4",
"filetype>=1.2.0",
"fbenum>=1.0.1",
]
dynamic = ["version"]
[dependency-groups]
dev = [
"python-git>=2018.2.1",
"pre-commit>=3.3.2",
"ruff>=0.4.4",
"gitpython>=3.1.43",
]
testing = [
"pytest>=7.3.1",
"pytest-asyncio>=0.19.0,<0.23.0", # 0.23.0 has a bugs with scopes
"pytest-pretty>=1.2.0",
"pytest-mock>=3.12.0",
"pytest-xdist>=3.6.1",
"pytest-cov>=5.0.0",
]
docs = ["mkdocs-material>=9.5.44", "mkdocs-minify-plugin>=0.8.0"]
[tool.uv.workspace]
members = [
"examples/echo",
"examples/levels",
"examples/help_desk",
"examples/gallery",
"examples/neuro_tags",
]
[tool.uv]
default-groups = ["dev", "testing"]
[tool.pdm.version]
source = "call"
getter = "scritps.version:get_version"
[tool.pytest.ini_options]
minversion = "6.2"
addopts = "-ra --dist=loadscope --color=yes"
asyncio_mode = "auto"
testpaths = ["tests"]
[tool.coverage.run]
branch = true
[tool.coverage.report]
exclude_also = [
"if TYPE_CHECKING:",
"^class .*\\(Protocol\\):$",
"if reason:",
"@overload",
"NotImplementedError",
]
[tool.ruff]
line-length = 120
indent-width = 4
target-version = "py312"
extend-exclude = [".git", ".vscode", ".devcontainer", ".github", ".venv"]
[tool.ruff.lint]
preview = true
select = [
# Pyflakes
"F",
# Pycodestyle
"D",
"E",
"W",
# isort
"I",
# pep8-naming
"N",
# flake8-bugbear
"B",
# pyupgrade
"UP",
# flake8-annotations
"ANN",
# flake8-bandit
"S",
# flake8-commas
"COM",
# flake8-datetimez
"DTZ",
# flake8-future-annotations
"FA",
# flake8-implicit-str-concat
"ISC",
# flake8-logging-format
"G",
# implicit-namespace-package
"INP001",
# flake8-pie
"PIE",
# flake8-print
"T20",
# flake8-pyi
"PYI",
# flake8-pytest-style
"PT",
# flake8-quotes
"Q",
# flake8-raise
"RSE",
# flake8-return
"RET",
# flake8-self
"SLF",
# flake8-simplify
"SIM",
# flake8-tidy-imports
"TID",
# flake8-type-checking
"TCH",
# flake8-use-pathlib
"PTH",
# eradicate
"ERA",
# Pylint
"PL",
# Ruff-specific rules
"RUF",
]
ignore = [
# https://github.com/charliermarsh/ruff/discussions/4542
# Missing type annotation for {name} in method
"ANN101",
"ANN102",
# Package dosctring check
"D104",
# Checks for string literals that are explicitly concatenated (using `+` operator)
'ISC003',
# Private member accessed
'SLF001',
# First argument of a method should be named `self`
"N805",
# It's not work properly for pydantic models
# Move standard library import `datetime` into a type-checking block
"TCH001",
"TCH002",
"TCH003",
# Ternary operator make code less readable
# Use ternary operator {} instead of `if`-`else`-
"SIM108",
# Use a single `if` statement instead of nested `if` statementsRuff
"SIM102",
# allow rename imported module to the same name to allow unused imports in __init__.py
"PLC0414",
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = [
# Allow missing module docstring
"D100",
# Allow asserts in tests
"S101",
# Allow pseudorandom number generator in tests. We do not make any cryptographic operations in tests
"S311",
# Checks for iterations over set literals is wrong. Set fits better than list on iteration by values
"PLC0208",
# We allow some magic values in the tests. It's acceptable
"PLR2004",
# We allow async function without await in tests
"RUF029",
]
"docs/source/conf.py" = [
# Allow implicit namespace package
"INP001",
"D100",
]
[tool.ruff.lint.flake8-quotes]
inline-quotes = "single"
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.ruff.lint.flake8-type-checking]
strict = true
[tool.ruff.lint.pydocstyle]
# Use Google-style docstrings.
convention = "google"
[tool.ruff.lint.flake8-annotations]
mypy-init-return = true
[tool.ruff.lint.pylint]
allow-dunder-method-names = ["__get_pydantic_core_schema__"]
max-args = 7
[tool.ruff.format]
preview = true
quote-style = "single"