-
Notifications
You must be signed in to change notification settings - Fork 12
/
pyproject.toml
107 lines (98 loc) · 2.39 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
[project]
name = "MP2IBot"
version = "1.0"
dependencies = [
"discord.py",
"httpx",
"beautifulsoup4",
"typing_extensions",
"tzdata",
"Pillow",
"openai",
"fpdf2",
"pdf2image",
]
requires-python = ">=3.12"
[tool.uv]
dev-dependencies = [
# "uv",
"pyright",
"debugpy",
"ruff",
"types-beautifulsoup4",
"tox",
"tox-uv",
]
[tool.tox]
legacy_tox_ini = """
[tox]
envlist = py312
[testenv]
runner = uv-venv-lock-runner
description = run all checks on the code
extras =
dev
commands =
ruff format --check src
ruff check src
pyright src/
"""
[tool.ruff]
line-length = 120
indent-width = 4
target-version = "py312"
src = ["src"]
exclude = ["bin"]
[tool.ruff.lint]
select = [
"E", # pycodestyle Error
"F", # pyflakes
"UP", # pyupgrade
"SIM", # flake8-simplify
"I", # imports
"S", # bandit (security)
"N", # pep8-naming
"ASYNC", # flake8-async
"C4", # flake8-compehensions
"FA", # flake8-future-annotations
"ISC", # flake8-implicit-str-concat
"ICN", # flake8-import-conventions
"G", # flake8-logging-format
"PIE", # flake8-pie
"PYI", # flake8-pyi
"RSE", # flake8-raise
"SLOT", # flake8-slots
"INT", # flake8-gettext
"TRY", # tryceratops
"FLY", # flynt
"PERF", # Perflint
"FURB", # refurb
"LOG", # flake8-logging
"RUF", # Ruff-specific-rules
# "ERA", # locate commented codes
# "FIX", # locate TODOs and FIXME
# "PTH", # flake8-use-pathlib (maybe todo ?)
# "TID", # flake8-tidy-imports (maybe todo ?)
# "SLF", # flake8-self (managed by pyright)
# "RET", # flake8-return
# "Q", # flake8-quotes
# "T20", # flake8-print
# "DTZ", # flake8-datetimez (TODO)
# "B", # flake8-bugbear
]
ignore = [
"E501", # line too long (we relate on the formater)
"N818", # Error suffix for exceptions names
# "PIE796", # Enum contains duplicate value
"TRY003", # Avoid specifying long messages outsides the exception class
"ISC001", # To avoid conflicts with the formatter
]
dummy-variable-rgx = '^\*{0,2}(_$|__$|unused_|dummy_)'
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
[tool.ruff.lint.isort]
combine-as-imports = true
[tool.ruff.lint.pyflakes]
extend-generics = ["discord.app_commands.CommandTree"]