-
Notifications
You must be signed in to change notification settings - Fork 1
/
pyproject.toml
114 lines (95 loc) · 2.13 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
[tool.poetry]
name = "TelegramBot"
version = "2023.9.1"
description = "Telegram bot"
authors = [
"Oleg A. <t0rr@mail.ru>",
]
[tool.poetry.dependencies]
python = "^3.10"
aiogram = "~3.1"
aiohttp = { version = "~3.8.6", extras = ["speedups"] }
uvloop = { version = "~0.17", markers = "sys_platform != 'win32' and implementation_name == 'cpython'" }
redis = { version = "~5.0", extras = ["hiredis"] }
backoff = "~2.2"
pydantic-settings = " ~2.0"
msgspec = "~0.18"
[tool.poetry.dev-dependencies]
black = { version = "^24.3", extras = ["d"] }
mypy = "^1.5"
pre-commit = "^3.3"
pytest = "^7.2"
pytest-aiohttp = "^1.0"
ruff = "^0.0"
[tool.black]
exclude = '''
/(
\.git
| \.mypy_cache
| \.pytest_cache
| \.tox
| venv
| build
| dist
)/
'''
[tool.mypy]
warn_redundant_casts = true
warn_unused_ignores = false
warn_no_return = true
warn_unreachable = false
pretty = true
[[tool.mypy.overrides]]
module = "*.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "tests.*"
ignore_errors = true
[tool.ruff]
src = ["app", "tools", "tests"]
select = ["ALL"]
ignore = ["ANN101", "ANN102", "D100", "D101", "D106", "D107", "D104", "D203", "D213", "RUF001", "RUF002", "RUF003", "S101", "PT015", "PT017", "B011"]
fixable = ["ALL"]
unfixable = []
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".hg",
".mypy_cache",
".nox",
".pants.d",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
]
# Same as Black.
line-length = 88
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
# Assume Python 3.11.
target-version = "py311"
[tool.ruff.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 10
[tool.ruff.flake8-type-checking]
strict = true
[tool.ruff.per-file-ignores]
"tests/*" = ["S101", "INP001"]
"tools/*" = ["INP001"]
[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"
[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = ["tests"]