-
-
Notifications
You must be signed in to change notification settings - Fork 676
/
pyproject.toml
103 lines (90 loc) · 2.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
[tool.poetry]
name = "bot"
version = "1.0.1"
description = "The community bot for the Python Discord community."
authors = ["Python Discord <[email protected]>"]
license = "MIT"
[tool.poetry.dependencies]
python = "3.12.*"
# See https://bot-core.pythondiscord.com/ for docs.
pydis_core = { version = "11.5.1", extras = ["all"] }
aiohttp = "3.11.7"
arrow = "1.3.0"
beautifulsoup4 = "4.12.3"
colorama = { version = "0.4.6", markers = "sys_platform == 'win32'" }
coloredlogs = "15.0.1"
deepdiff = "7.0.1"
emoji = "2.14.0"
feedparser = "6.0.11"
lxml = "5.3.0"
markdownify = "0.13.1"
python-dateutil = "2.9.0.post0"
python-frontmatter = "1.1.0"
rapidfuzz = "3.10.1"
regex = "2024.11.6"
sentry-sdk = "2.19.0"
tenacity = "9.0.0"
tldextract = "5.1.3"
pydantic = "2.10.1"
pydantic-settings = "2.6.1"
[tool.poetry.dev-dependencies]
coverage = "7.6.7"
httpx = "0.27.2"
pre-commit = "4.0.1"
pip-licenses = "5.0.0"
pytest = "8.3.3"
pytest-cov = "6.0.0"
pytest-subtests = "0.13.1"
pytest-xdist = "3.6.1"
ruff = "0.8.0"
taskipy = "1.14.0"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.taskipy.tasks]
start = "python -m bot"
configure = "python -m botstrap"
lint = "pre-commit run --all-files"
precommit = "pre-commit install"
build = "docker build -t ghcr.io/python-discord/bot:latest -f Dockerfile ."
push = "docker push ghcr.io/python-discord/bot:latest"
test = "pytest -n auto --ff"
retest = "pytest -n auto --lf"
test-cov = "pytest -n auto --cov-report= --cov"
html = "coverage html"
report = "coverage report"
[tool.coverage.run]
branch = true
source_pkgs = ["bot"]
source = ["tests"]
[tool.ruff]
target-version = "py312"
extend-exclude = [".cache"]
line-length = 120
output-format = "concise"
unsafe-fixes = true
[tool.ruff.lint]
select = ["ANN", "B", "C4", "D", "DTZ", "E", "F", "I", "ISC", "INT", "N", "PGH", "PIE", "Q", "RET", "RSE", "RUF", "S", "SIM", "T20", "TID", "UP", "W"]
ignore = [
"ANN002", "ANN003", "ANN204", "ANN206", "ANN401",
"B904",
"C401", "C408",
"D100", "D104", "D105", "D107", "D203", "D212", "D214", "D215", "D301",
"D400", "D401", "D402", "D404", "D405", "D406", "D407", "D408", "D409", "D410", "D411", "D412", "D413", "D414", "D416", "D417",
"E731",
"RET504",
"RUF005", "RUF012", "RUF015",
"S311",
"SIM102", "SIM108",
]
[tool.ruff.lint.isort]
order-by-type = false
case-sensitive = true
combine-as-imports = true
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["ANN", "D"]
[tool.pytest.ini_options]
# We don't use nose style tests so disable them in pytest.
# This stops pytest from running functions named `setup` in test files.
# See https://github.com/python-discord/bot/pull/2229#issuecomment-1204436420
addopts = "-p no:nose"