-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
158 lines (139 loc) · 3.78 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
[project]
name = "lattebot"
version = "0.1.0"
description = "discord bot"
readme = "README.md"
requires-python = ">=3.13"
authors = [{ name = "STACiA", email = "stacia.dev@gmail.com" }]
license = { file = "LICENSE" }
dependencies = [
"discord-py[speed]",
"jishaku>=2.6.0,<3.0.0",
"pydantic>2.0",
"pydantic-settings>=2.7.1,<3.0.0",
"uvloop>=0.21.0; sys_platform != 'win32'",
"pyyaml>=6.0.2,<7.0.0",
"anyio>=4.8.0,<5.0.0",
"pygit2>=1.17.0,<2.0.0",
"cchardet==2.2.0a2; python_version < '3.14'",
]
[dependency-groups]
dev = [
"mypy>=1.14.1,<1.15.0",
"ruff>=0.9.3,<0.10.0",
"pytest>=8.3.4,<9.0.0",
"pytest-cov>=6.0.0,<7.0.0",
"coverage>=7.6.10,<8.0.0",
"types-pyyaml>=6.0.12.20241230,<7.0.0",
"watchfiles>=v1.0.4,<1.1.0",
]
[tool.uv.sources]
discord-py = { git = "https://github.com/Rapptz/discord.py", rev = "master" }
[tool.mypy]
strict = true
python_version = "3.13"
exclude = [".venv"]
[tool.ruff]
line-length = 120
target-version = "py313"
exclude = [
".git",
".ruff_cache",
".mypy_cache",
".pytest_cache",
".venv",
".vscode",
]
[tool.ruff.format]
preview = true
quote-style = "single"
skip-magic-trailing-comma = false
[tool.ruff.lint]
preview = true
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"N", # pep8-naming
"D", # pydocstyle
"YTT", # flake8-2020
"ANN", # flake8-annotations
"ASYNC", # flake8-async
"S", # flake8-bandit
"BLE", # flake8-blind-except
"A", # flake8-builtins
"COM", # flake8-commas
"DTZ", # flake8-datetimez
"T10", # flake8-debugger
"FA", # flake8-future-annotations
"ISC", # flake8-implicit-str-concat
"LOG", # flake8-logging
"G", # flake8-logging-format
"PIE", # flake8-pie
"PYI", # flake8-pyi
"PT", # flake8-pytest-style
"Q", # flake8-quotes
"RSE", # flake8-raise
"RET", # flake8-return
"SIM", # flake8-simplify
"TC", # flake8-type-checking
"ARG", # flake8-unused-arguments
"PTH", # flake8-use-pathlib
"PGH", # pygrep-hooks
"PL", # pylint
"TRY", # tryceratops
"FLY", # flynt
"PERF", # perflint
"FURB", # refurb
"RUF", # ruff-specific rules
# maybe enable later
# "TID", # flake8-tidy-imports
# "ICN", # flake8-import-conventions
]
ignore = [
"ANN401", # any-type
"COM812", # trailing-comma-missing
"COM819", # prohibited-trailing-comma
"D100", # undocumented-public-module
"D101", # undocumented-public-class
"D102", # undocumented-public-method
"D103", # undocumented-public-function
"D104", # undocumented-public-package
"D105", # undocumented-magic-method
"D106", # undocumented-public-nested-class
"D107", # undocumented-public-init
"E501", # line-too-long, handled by black
"PLR6301", # no-self-use
"TRY003", # raise-vanilla-args
"ISC001", # single-line-implicit-string-concatenation, conflicts with black
]
[tool.ruff.lint.pyflakes]
extend-generics = ["discord.app_commands.CommandTree"]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.ruff.lint.isort]
combine-as-imports = true
[tool.ruff.lint.flake8-quotes]
inline-quotes = "single"
[tool.ruff.lint.flake8-type-checking]
quote-annotations = true
runtime-evaluated-base-classes = ["pydantic.BaseModel"]
[tool.ruff.lint.flake8-unused-arguments]
ignore-variadic-names = true
[tool.ruff.lint.per-file-ignores]
"lattebot/logging.py" = [
"A005", # builtin-module-shadowing, allowed filename logging.py
]
"tests/**/*.py" = [
"S101", # assert, allowed in tests
]
[tool.coverage.report]
show_missing = true
precision = 2
exclude_also = ["if TYPE_CHECKING:"]
[tool.pytest.ini_options]
addopts = "-vv --showlocals --tb=short --strict -p no:warnings --cov=lattebot --cov=tests --cov-append"