Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
64 lines (55 loc) · 1.77 KB
/
Copy pathpyproject.toml
File metadata and controls
64 lines (55 loc) · 1.77 KB
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
[project]
name = "my-bot-project"
version = "0.1.0"
requires-python = ">=3.12"
# ==============================================================================
# RUFF (Линтер и форматировщик)
# ==============================================================================
[tool.ruff]
target-version = "py312"
line-length = 79
src = ["src"]
exclude = [
".git",
"__pycache__",
"alembic",
"venv",
".venv",
]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # Pyflakes (ошибки синтаксиса и импортов)
"I", # isort (авто-сортировка импортов)
"B", # flake8-bugbear (ловит скрытые баги)
"UP", # pyupgrade (обновляет синтаксис до Python 3.12)
"ASYNC", # flake8-async (ловит баги с async/await)
]
ignore = [
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
"tests/*" = ["B018"]
# ==============================================================================
# MYPY (Проверка типов)
# ==============================================================================
[tool.mypy]
python_version = "3.12"
mypy_path = "."
files = ["src"]
plugins = ["sqlalchemy.ext.mypy.plugin"]
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
ignore_missing_imports = true
explicit_package_bases = true
exclude = ["venv", "\\.venv", "alembic"]
# ==============================================================================
# PYTEST (Тестирование)
# ==============================================================================
[tool.pytest.ini_options]
asyncio_mode = "auto"
pythonpath = ["."]
testpaths = ["tests"]
python_files = ["test_*.py"]