-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
168 lines (137 loc) · 4.69 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
[tool.poetry]
name = "discord-bot"
version = "0.0.0"
description = "A Discord Bot for the ITeapot team. Powered by hikari, crescent & miru."
authors = ["ITeapotPL <[email protected]>"]
license = "GPL-3.0"
readme = "README.md"
packages = [{ include = "discord_bot/" }]
homepage = "https://github.com/ITeapotPL/discord-bot"
[tool.poetry.urls]
Documentation = "https://iteapot-discord-bot.readthedocs.io/en/latest/"
Issues = "https://github.com/ITeapotPL/discord-bot/issues"
Coverage = "https://coverage-badge.samuelcolvin.workers.dev/redirect/ITeapotPL/discord-bot"
[tool.poetry.dependencies]
python = "^3.8"
[tool.poetry.group.dev.dependencies]
mypy = "^1.7.0"
ruff = "^0.1.2"
towncrier = "^23.11.0"
pytest = "^7.4.3"
coverage = "^7.3.2"
poethepoet = "^0.24.3"
pre-commit = "^3.5.0"
smokeshow = "^0.4.0"
[tool.poetry.group.docs]
optional = true
[tool.poetry.group.docs.dependencies]
markdown-exec = ">=1.3.0"
mkdocs-material = ">=8.2,<10.0.0"
mkdocstrings = { version = ">=0.19.0", extras = ["python"] }
[tool.poe.tasks]
test = "pytest -v"
lint = "ruff check ."
lock = "scripts/lock.sh"
bump = "scripts/bump.sh"
check = [
{ ref="test" },
{ ref="lint" },
{ ref="lock" },
]
release.script = "scripts.release:main"
[tool.poe.tasks.added]
shell = "towncrier create $TICKET.added.md --edit"
args = [{name = "TICKET", positional = true}]
[tool.poe.tasks.changed]
shell = "towncrier create $TICKET.changed.md --edit"
args = [{name = "TICKET", positional = true}]
[tool.poe.tasks.fixed]
shell = "towncrier create $TICKET.fixed.md --edit"
args = [{name = "TICKET", positional = true}]
[tool.poe.tasks.deprecated]
shell = "towncrier create $TICKET.deprecated.md --edit"
args = [{name = "TICKET", positional = true}]
[tool.poe.tasks.removed]
shell = "towncrier create $TICKET.removed.md --edit"
args = [{name = "TICKET", positional = true}]
[tool.poe.tasks.security]
shell = "towncrier create $TICKET.security.md --edit"
args = [{name = "TICKET", positional = true}]
[tool.ruff]
exclude = ["tests/", "scripts/"]
# To discuss the presented rationales, contact the author (bswck).
select = ["ALL"]
ignore = [
# Description: Missing type annotation for self in method
# Rationale: It is mostly redundant, as is for ANN102.
"ANN101",
# Description: Missing type annotation for cls in method
# Rationale: It is mostly redundant, as is for ANN101.
"ANN102",
# Description: Dynamically typed expressions (typing.Any) are disallowed
# Rationale:
# We use Any to allow user to constrain return types of our functions on their own.
# For example, having a function `def foo() -> Any: ...` allows user to write
# `my_foo: int = foo()` and have it passed type checking, since `Any` disables
# type checking completely.
"ANN401",
# Description: 1 blank line required before class docstring
# Rationale: Remove the warning -- D211 (no-blank-line-before-class) preferred.
"D203",
# Description: Multi-line docstring summary should start at the second line
# Rationale: Remove the warning -- D213 (multi-line-summary-second-line) preferred.
"D212",
# Description: Line contains TODO, consider resolving the issue
# Rationale: Not appropriate for the project.
"FIX002",
]
[tool.mypy]
strict = true
[tool.isort]
profile = "black"
[tool.towncrier]
directory = "changes"
package = "discord_bot"
filename = "CHANGELOG.md"
start_string = "<!-- insertion marker -->\n"
underlines = ["", "", ""] # We use Markdown
title_format = "## [{version}](https://github.com/ITeapotPL/discord-bot/tree/{version}) – {project_date}"
issue_format = "[#{issue}](https://github.com/ITeapotPL/discord-bot/issues/{issue})"
[[tool.towncrier.type]]
directory = "security"
name = "Security"
showcontent = true
[[tool.towncrier.type]]
directory = "removed"
name = "Removed"
showcontent = true
[[tool.towncrier.type]]
directory = "deprecated"
name = "Deprecated"
showcontent = true
[[tool.towncrier.type]]
directory = "added"
name = "Added"
showcontent = true
[[tool.towncrier.type]]
directory = "changed"
name = "Changed"
showcontent = true
[[tool.towncrier.type]]
directory = "fixed"
name = "Fixed"
showcontent = true
[tool.coverage.report]
omit = ["tests/*"]
# fail_under = 96
exclude_also = [
# Be sure to include lines that are not meant to be covered
# by tests or encountered by the users at runtime.
"raise NotImplementedError", # Do not cover abstract methods.
"if ((t|typing)\\.?)?TYPE_CHECKING:", # Do not cover type checking imports.
"@((t|typing)\\.?)?overload", # Do not cover overload definitions.
"\\(((t|typing)\\.?)?Protocol\\):$", # Do not cover entire protocol definitions.
]
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"