-
Notifications
You must be signed in to change notification settings - Fork 185
/
pyproject.toml
192 lines (165 loc) · 5.37 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
[tool.poetry]
name = "interactions.py"
version = "5.13.2"
description = "Easy, simple, scalable and modular: a Python API wrapper for interactions."
authors = ["LordOfPolls <[email protected]>"]
[tool.poetry.dependencies]
python = ">=3.10,<4.0"
aiohttp = "^3.8.3"
attrs = ">=22.1.0"
mypy = ">0.930"
discord-typings = "^0.9.0"
tomli = "^2.0.1"
emoji = "^2.1.0"
croniter = "^2.0.2"
# Optional dependencies
aiodns = { version = "*", optional = true }
orjson = { version = "*", optional = true }
Brotli = { version = "*", optional = true }
faust-cchardet = { version = "*", optional = true }
uvloop = { version = "*", optional = true, platform = "!win32" }
mkdocs-autorefs = { version = "*", optional = true }
mkdocs-awesome-pages-plugin = { version = "*", optional = true }
mkdocs-material = { version = "*", optional = true }
mkdocstrings-python = { version = "*", optional = true }
mkdocs-minify-plugin = { version = "*", optional = true }
mkdocs-git-committers-plugin-2 = { version = "*", optional = true }
mkdocs-git-revision-date-localized-plugin = { version = "*", optional = true }
pytest = { version = "*", optional = true }
pytest-asyncio = { version = "*", optional = true }
pytest-cov = { version = "*", optional = true }
python-dotenv = { version = "*", optional = true }
typeguard = { version = "*", optional = true }
pre-commit = { version = "*", optional = true }
[tool.poetry.group.voice.dependencies]
PyNaCl = "^1.5.0,<1.6"
[tool.poetry.group.speedup.dependencies]
aiodns = "*"
orjson = "*"
Brotli = "*"
faust-cchardet = "*"
uvloop = { version = "*", platform = "!win32" }
[tool.poetry.group.sentry.dependencies]
sentry-sdk = "*"
[tool.poetry.group.jurigged.dependencies]
jurigged = "*"
[tool.poetry.group.console.dependencies]
aioconsole = "^0.6.0"
[tool.poetry.group.docs.dependencies]
mkdocs-autorefs = "*"
mkdocs-awesome-pages-plugin = "*"
mkdocs-material = "*"
mkdocstrings-python = "*"
mkdocs-minify-plugin = "*"
mkdocs-git-committers-plugin-2 = "*"
mkdocs-git-revision-date-localized-plugin = "*"
[tool.poetry.group.tests.dependencies]
pytest = "*"
pytest-asyncio = "*"
pytest-cov = "*"
python-dotenv = "*"
typeguard = "*"
[tool.poetry.group.dev.dependencies]
black = "^22.3.0"
pre-commit = "^2.19.0"
[tool.black]
line-length = 120
[tool.isort]
profile = "black"
skip = ["__init__.py"]
[tool.mypy]
ignore_missing_imports = true
[tool.pyright]
useLibraryCodeForTypes = true
reportMissingImports = false
[tool.coverage.report]
exclude_lines = ["pragma: no cover", "if TYPE_CHECKING:"]
[tool.coverage.run]
omit = ["tests/*"]
source = ["interactions"]
[build-system]
requires = ["setuptools", "tomli"]
build-backend = "setuptools.build_meta"
[tool.pytest.ini_options]
addopts = "-l -ra --durations=2 --junitxml=TestResults.xml"
doctest_optionflags = "NORMALIZE_WHITESPACE"
asyncio_mode = "auto"
log_cli = "1"
# log_cli_level = "DEBUG"
log_cli_format = "%(asctime)s [%(levelname)8s] %(message)s (%(filename)s:%(lineno)s)"
log_cli_date_format = "%Y-%m-%d %H:%M:%S"
[tool.ruff]
line-length = 120
target-version = "py310"
output-format = "concise" # set to full if you want to see the source of the error/warning
[tool.ruff.lint]
ignore-init-module-imports = true
task-tags = ["TODO", "FIXME", "XXX", "HACK", "REVIEW", "NOTE"]
select = ["E", "F", "B", "Q", "RUF", "D", "ANN", "RET", "C"]
ignore = [
"Q0",
"E501",
# These default to arguing with Black. We might configure some of them eventually
"ANN1",
# These insist that we have Type Annotations for self and cls.
"D105",
"D107",
# Missing Docstrings in magic method and __init__
"D401",
# First line should be in imperative mood; try rephrasing
"D400",
"D415",
# First line should end with a period
"D106",
# Missing docstring in public nested class. This doesn't work well with Metadata classes.
"D417",
# Missing argument in the docstring
"D406",
# Section name should end with a newline
"D407",
# Missing dashed underline after section
"D212",
# Multi-line docstring summary should start at the first line
"D404",
# First word of the docstring should not be This
"D203",
# 1 blank line required before class docstring
# Everything below this line is something we care about, but don't currently meet
"ANN001",
# Missing type annotation for function argument 'token'
"ANN002",
# Missing type annotation for *args
"ANN003",
# Missing type annotation for **kwargs
"ANN401",
# Dynamically typed expressions (typing.Any) are disallowed
# "B009",
# Do not call getattr with a constant attribute value, it is not any safer than normal property access.
"B010",
# Do not call setattr with a constant attribute value, it is not any safer than normal property access.
"D100",
# Missing docstring in public module
"D101",
# ... class
"D102",
# ... method
"D103",
# ... function
"D104",
# ... package
# Plugins we don't currently include: flake8-return
"RET503",
# missing explicit return at the end of function ableto return non-None value.
"RET504",
# unecessary variable assignement before return statement.
]
[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"
[tool.ruff.lint.flake8-annotations]
mypy-init-return = true
suppress-dummy-args = true
suppress-none-returning = true
[tool.ruff.lint.flake8-errmsg]
max-string-length = 20
[tool.ruff.lint.mccabe]
max-complexity = 13