forked from tandemdude/hikari-lightbulb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
187 lines (170 loc) · 6.11 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
[build-system]
requires = ["flit_core >=3.9,<4"]
build-backend = "flit_core.buildapi"
[project]
name = "hikari-lightbulb"
readme = "README.md"
requires-python = ">=3.10.0,<3.14"
authors = [{name = "tandemdude", email = "[email protected]"}]
keywords = ["hikari"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: MIT License",
"Framework :: AsyncIO",
"Intended Audience :: Developers",
"Natural Language :: English",
"Topic :: Software Development :: Libraries :: Python Modules",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Application Frameworks",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
]
dependencies = ["hikari~=2.1.0", "async-timeout>=4, <6"]
dynamic = ["version", "description"]
[project.urls]
Homepage = "https://github.com/tandemdude/hikari-lightbulb"
Repository = "https://github.com/tandemdude/hikari-lightbulb"
Documentation = "https://hikari-lightbulb.readthedocs.io/en/latest/"
Changelog = "https://hikari-lightbulb.readthedocs.io/en/latest/changelog.html"
[project.optional-dependencies]
localization = ["polib>=1.2.0, <2"]
crontrigger = ["croniter>=3.0.3, <6"]
dev = ["nox==2024.10.9"]
"dev.docs" = [
"sphinx>=8.0.2, <9",
"furo==2024.8.6",
"myst-parser>=4.0.0, <5",
"sphinx-copybutton>=0.5.2, <1",
"sphinx-inline-tabs==2023.4.21",
"sphinx_design>=0.6.0, <1",
"sphinx-prompt>=1.8.0, <2",
"sphinx-notfound-page>=1.0.2, <2",
"sphinxext-opengraph>=0.9.1, <1",
"sphinxcontrib-mermaid>=0.9.2, <2",
]
"dev.format" = ["ruff==0.7.4"]
"dev.typecheck" = [
"pyright==1.1.389",
"typing-extensions>=4.12.2, <5",
"types-polib>=1.2.0.20240327, <2",
"types-croniter>=3.0.0.20240727, <5",
]
"dev.slotscheck" = ["slotscheck>=0.19.0, <1"]
"dev.test" = [
"pytest>=8.3.2, <9",
"pytest-asyncio>=0.23.8, <0.25",
"pytest-cov>=5.0.0, <7",
"pytest-randomly>=3.15.0, <4"
]
"dev.release" = ["flit==3.10.1"]
"dev.changelog" = ["towncrier==24.8.0"]
[tool.flit.module]
name = "lightbulb"
[tool.towncrier]
directory = "fragments"
filename = "CHANGES.md"
package = "lightbulb"
title_format = "v{version} ({project_date})"
issue_format = "[#{issue}](https://github.com/tandemdude/hikari-lightbulb/issues/{issue})"
orphan_prefix = "+"
type = [
{ directory = "breaking", name = "Breaking Changes", showcontent = true },
{ directory = "removal", name = "Removals", showcontent = true },
{ directory = "deprecation", name = "Deprecations", showcontent = true },
{ directory = "feature", name = "Features", showcontent = true },
{ directory = "bugfix", name = "Bugfixes", showcontent = true },
{ directory = "doc", name = "Documentation", showcontent = true },
{ directory = "misc", name = "Miscellaneous", showcontent = true },
]
[tool.black]
line-length = 120
target-version = ["py310"]
include = ".*py$"
[tool.ruff]
line-length = 120
target-version = "py310"
[tool.ruff.lint]
preview = true
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # Pyflakes
"I", # isort
"TCH", # typechecking imports
"N", # naming
"ASYNC", # async lints
"Q", # enforce double-quotes
"RSE", # avoid needless parens
"SIM", # simplification
"RUF", # ruff lints
"D2", # Docstring formatting
"D213", # Multi-line docstring summary should start at the second line
"D3", # Use triple-quotes
"D415", # First line of docstring should end with period
"D417", # Missing argument descriptions in docstring
"D418", # No docstring on @overload
"D419", # No empty docstring
"ANN2", # Function missing return type annotation
]
fixable = [
"I", # isort errors
"TCH", # typechecking imports
"F401", # unused import
"F404", # late __future__ import
"F541", # f-string with no placeholders
"RUF022", # __all__ is not sorted
"RUF023", # {}.__slots__ is not sorted
]
ignore = [
"D212", # Multi-line docstring summary should start at the first line
"RUF001", # ambiguous character
"N818", # exception name should end in Error
"D205", # 1 blank line required between summary line and description
]
[tool.ruff.lint.isort]
force-single-line = true
[tool.ruff.lint.per-file-ignores]
# F401 (Unused import) - init files don't use their imports
# F403 (Star import used) - hopefully we're sensible enough to know what objects modules contain
# F405 (Import via star) - everything is imported to top-level
"__init__.py" = ["F401", "F403", "F405"]
# N802 (Function name should be lowercase)
# RUF029 (Function is declared async but does not use async/await)
"tests/*.py" = ["N802", "RUF029"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.slotscheck]
strict-imports = true
require-superclass = true
require-subclass = true
exclude-classes = """
(
^lightbulb\\.commands\\.commands:CommandMeta$
)
"""
[tool.pyright]
include = ["lightbulb", "examples", "tests"]
exclude = ["docs", ".github"]
pythonVersion = "3.10"
typeCheckingMode = "strict"
reportUnnecessaryTypeIgnoreComment = "error"
reportMissingTypeStubs = "none"
reportImportCycles = "none" # Doesn't account for TYPE_CHECKING
reportIncompatibleMethodOverride = "none" # This relies on ordering for keyword-only arguments
reportOverlappingOverload = "none" # Type-Vars in last overloads may interfere
reportIncompatibleVariableOverride = "none" # Cannot overwrite abstract properties using attrs
reportPrivateUsage = "none" # Too annoying
reportUnknownMemberType = "warning" # NetworkX is untyped :/
[tool.pytest.ini_options]
filterwarnings = [
'ignore:.*"@coroutine" decorator is deprecated.*:DeprecationWarning',
"ignore:.*The loop argument is deprecated.*:DeprecationWarning"
]
[tool.coverage.report]
exclude_also = ["if t.TYPE_CHECKING:"]