-
Notifications
You must be signed in to change notification settings - Fork 21
/
pyproject.toml
140 lines (126 loc) · 3.5 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
[tool.poetry]
name = "tg_odesli_bot"
version = "0.3.2"
description = "Telegram Bot to share music with Odesli (former Songlink) service."
repository = "https://github.com/9dogs/tg-odesli-bot"
homepage = "https://github.com/9dogs/tg-odesli-bot"
authors = ["Mikhail Knyazev <hellishbot@gmail.com>"]
license = "GPL-3.0-only"
readme = "README.md"
[tool.poetry.dependencies]
python = ">=3.10,<3.13"
aiocache = "^0.12.0"
aiogram = "<3"
python-dotenv = "^1.0.0"
sentry-sdk = "^1"
structlog = "^24.0.0"
structlog-sentry = "^2.0.0"
aiohttp = "^3.8.0"
ujson = "^5.4.0"
spotipy = "^2.22.1"
pydantic-core = "^2.0"
pydantic-settings = "^2"
[tool.poetry.group.dev]
optional = true
[tool.poetry.group.dev.dependencies]
aioresponses = "^0.7.0"
ruff = ">0.1"
coverage = "^7.0"
mypy = "^1.0"
pytest = "^7.0"
pytest-cov = "^4.0.0"
pytest-aiohttp = "^1.0"
pytest-timeout = "^2.0.0"
asynctest = "^0.13.0"
toml = "^0.10.2"
[tool.poetry.scripts]
tg-odesli-bot = "tg_odesli_bot.bot:main"
[tool.pytest.ini_options]
junit_family = "xunit2"
asyncio_mode = "auto"
testpaths = ["tests"]
[tool.mypy]
sqlite_cache = true
ignore_missing_imports = true
show_error_codes = true
warn_unused_configs = true
warn_redundant_casts = true
warn_unused_ignores = true
no_implicit_optional = true
strict_equality = true
plugins = "pydantic.mypy"
[tool.coverage.run]
branch = true
[tool.pydocstyle]
# D202: No blank lines allowed after function docstring
# D203: 1 blank line required before class docstring
# D205: 1 blank line required between summary line and description
# D213: Multi-line docstring summary should start at the second line
# D400: First line should end with a period
# D415: First line should end with a period, question mark, or exclamation point
ignore = ["D202", "D203", "D205", "D213", "D400", "D415"]
match = ".*\\.py"
[tool.ruff]
select = [
"F", # Pyflakes
"E", # pycodestyle
"W", # pycodestyle
"I", # isort
"N", # pep8-naming
"D", # pydocstyle
"UP", # pyupgrade
"BLE", # flake8-blind-except
"B", # flake8-bugbear
"A", # flake8-builtins
"C4", # flake8-comprehensions
"T10", # flake8-debugger
"PIE", # flake8-pie
"T20", # flake8-print
"Q", # flake8-quotes
"SIM", # flake8-simplify
"PTH", # flake8-use-pathlib
"PL", # Pylint
]
dummy-variable-rgx = "^__$"
line-length = 79
target-version = "py310"
ignore = [
# Missing type annotation for self in a class method
"ANN101",
# Missing type annotation for a class attribute
"ANN102",
# Class attribute {name} is shadowing a python builtin (e.g., `id`)
"A003",
# Do not perform function call in argument defaults
"B008",
# 1 blank line required before class docstring
"D203",
# 1 blank line required between summary line and description
"D205",
# Multi-line docstring summary should start at the second line
"D213",
# Magic value used in comparison, consider replacing {value} with a constant variable
"PLR2004",
# Too many arguments to function call
"PLR0913",
# Too many branches
"PLR0912",
# Too many statements
"PLR0915",
]
src = ["src", "tests"]
output-format = "grouped"
[tool.ruff.flake8-quotes]
inline-quotes = "single"
docstring-quotes = "double"
[tool.ruff.flake8-annotations]
allow-star-arg-any = true
[tool.ruff.flake8-unused-arguments]
ignore-variadic-names = true
[tool.ruff.isort]
known-first-party = ["tg_odesli_bot", "tests"]
[tool.ruff.format]
quote-style = "single"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"