-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
79 lines (71 loc) · 3.06 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
[project]
name = "homework-bot"
version = "0.1.0"
description = "Telegram-бот для проверки статуса домашней работы на сервисе Практикум.Домашка"
readme = "README.md"
requires-python = "~=3.12"
dependencies = [
"python-dotenv>=1.0.1",
"python-telegram-bot==13.11",
"requests>=2.32.3",
"urllib3==1.26.20",
]
[dependency-groups]
dev = [
"pytest>=8.3.4",
"pytest-timeout>=2.3.1",
]
[tool.pytest.ini_options]
addopts = '-vv -p no:cacheprovider -p no:warnings --show-capture=no'
testpaths = ['tests/']
python_files = ['test_*.py']
timeout = 2
[tool.ruff]
target-version = "py312"
line-length = 79
preview = true
output-format = "concise" # preview mode switches this to full
[tool.ruff.format]
quote-style = "single"
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"D1", # pydocstyle (allow missing docstrings)
"ANN", # flake8-annotations (demands type annotations)
"S", # flake8-bandit (security testing)
"COM", # flake8-commas (conflicts with formatter)
"CPY", # flake8-copyright (demands copyright notices)
"Q", # flake8-quotes (conflicts with formatter)
"T20", # flake8-print (prohibits print statements)
"ISC001", # single-line-implicit-string-concatenation (conflicts with formatter)
"PGH003", # blanket-type-ignore (PyLance doesn't provide error codes)
"B905", # zip-without-explicit-strict (makes zip too bulky)
"E731", # lambda-assignment (precludes a concise functional style)
"PLC0415", # import-outside-top-level (sometimes imports in a function are necessary)
"PLR2004", # magic-value-comparison (demands too many constants)
"TD003", # missing-todo-link (too cumbersome)
"G004", # logging-f-string (pointless micro-optimization in most cases)
"DOC201", # docstring-missing-returns (excessive documentation)
"DOC402", # docstring-missing-yields (excessive documentation)
"DOC501", # docstring-missing-exception (excessive documentation)
]
allowed-confusables = [
"а", "б", "в", "г", "е", "з", "и", "к", "м", "н", "о", "р", "с", "у", "ф", "х",
"А", "Б", "В", "Г", "Е", "З", "И", "К", "М", "Н", "О", "Р", "С", "У", "Ф", "Х",
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = [
"N802", # invalid-function-name (common in test methods)
"PLR6301", # no-self-use (common in test methods)
"ARG002", # unused-method-argument (common with fixtures)
"BLE001", # blind-except (common in tests)
"PLR0913", # too-many-arguments (common with fixtures)
"PLR0917", # too-many-positional (common with fixtures)
"RUF012", # mutable-class-default (common in test classes)
]
[tool.ruff.lint.pydocstyle]
convention = "pep257"
[tool.ruff.lint.flake8-pytest-style]
fixture-parentheses = false
parametrize-names-type = "csv"
parametrize-values-type = "tuple"