This repository has been archived by the owner on Jun 13, 2024. It is now read-only.
forked from DisnakeDev/disnake
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
204 lines (175 loc) · 4.85 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
# SPDX-License-Identifier: MIT
[build-system]
requires = ["setuptools>=61"]
build-backend = "setuptools.build_meta"
[project]
name = "disnake"
description = "A Python wrapper for the Discord API"
readme = "README.md"
authors = [
{ name = "Disnake Development" }
]
requires-python = ">=3.8"
keywords = ["disnake", "discord", "discord api"]
license = { text = "MIT" }
classifiers = [
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: MIT License",
"Intended Audience :: Developers",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Internet",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Utilities",
"Typing :: Typed",
]
dynamic = ["version", "dependencies", "optional-dependencies"]
[project.urls]
Changelog = "https://docs.disnake.dev/page/whats_new.html"
Documentation = "https://docs.disnake.dev/"
Repository = "https://github.com/DisnakeDev/disnake"
[tool.black]
line-length = 100
target-version = ["py38", "py39", "py310"]
[tool.isort]
profile = "black"
py_version = 38
line_length = 100
combine_as_imports = true
filter_files = true
[tool.taskipy.tasks]
black = { cmd = "task lint black", help = "Run black" }
docs = { cmd = "nox -Rs docs --", help = "Build the documentation for development"}
flake8 = { cmd = "flake8", help = "Run flake8"}
isort = { cmd = "task lint isort", help = "Run isort" }
lint = { cmd = "nox -Rs lint --", help = "Check all files for linting errors" }
pyright = { cmd = "nox -Rs pyright --", help = "Run pyright" }
setup_env = {cmd = 'nox -s setup --', help = 'Setup the local environment and set up all dependencies'}
test = { cmd = "nox -Rs test --", help = "Run pytest" }
[tool.towncrier]
template = "changelog/_template.rst.jinja"
package = "disnake"
filename = "docs/whats_new.rst"
directory = "changelog/"
title_format = false
underlines = "-~"
issue_format = ":issue:`{issue}`"
[[tool.towncrier.type]]
directory = "breaking"
name = "Breaking Changes"
showcontent = true
[[tool.towncrier.type]]
directory = "deprecate"
name = "Deprecations"
showcontent = true
[[tool.towncrier.type]]
directory = "feature"
name = "New Features"
showcontent = true
[[tool.towncrier.type]]
directory = "bugfix"
name = "Bug Fixes"
showcontent = true
[[tool.towncrier.type]]
directory = "doc"
name = "Documentation"
showcontent = true
[[tool.towncrier.type]]
directory = "misc"
name = "Miscellaneous"
showcontent = true
[tool.slotscheck]
strict-imports = true
require-superclass = true
require-subclass = false
exclude-modules = '''
(
^disnake\.types\.
)
'''
[tool.pyright]
typeCheckingMode = "strict"
include = [
"disnake",
"docs",
"examples",
"test_bot",
"tests",
"*.py",
]
ignore = [
"disnake/ext/mypy_plugin",
"noxfile.py", # this is ignored because nox is not installed in the environment when running pyright
]
# this is one of the diagnostics that aren't enabled by default, even in strict mode
reportUnnecessaryTypeIgnoreComment = true
# it's unlikely that these will ever be enabled
reportOverlappingOverload = false
reportPrivateUsage = false
reportUnnecessaryIsInstance = false
reportFunctionMemberAccess = false
reportMissingTypeStubs = false
reportUnusedFunction = false
reportUnusedClass = false
reportConstantRedefinition = false
reportImportCycles = false
reportIncompatibleMethodOverride = false
reportIncompatibleVariableOverride = false
# these are largely due to missing type hints, and make up most of the error count
reportUnknownMemberType = false
reportUnknownParameterType = false
reportUnknownArgumentType = false
reportMissingParameterType = false
reportUnknownVariableType = false
reportMissingTypeArgument = false
[tool.pytest.ini_options]
testpaths = "tests"
addopts = "--strict-markers -Werror -s"
xfail_strict = true
asyncio_mode = "strict"
[tool.coverage.run]
branch = true
include = [
"disnake/*",
"tests/*",
]
omit = [
"disnake/ext/mypy_plugin/*",
"disnake/types/*",
"disnake/__main__.py",
]
[tool.coverage.report]
precision = 1
exclude_lines = [
"# pragma: no cov(er(age)?)?$",
"^\\s*def __repr__",
"^\\s*@overload",
"^\\s*if TYPE_CHECKING",
"^\\s*raise NotImplementedError$",
"^\\s*\\.\\.\\.$",
]
[tool.check-manifest]
ignore = [
# CI
".flake8",
".pre-commit-config.yaml",
".readthedocs.yml",
".libcst.codemod.yaml",
"noxfile.py",
# docs
"CONTRIBUTING.md",
"assets/**",
"changelog/**",
"docs/**",
"examples/**",
# tests
"test_bot/**",
"test_launcher.py",
"tests/**",
"scripts/**",
]