-
Notifications
You must be signed in to change notification settings - Fork 99
/
pyproject.toml
197 lines (177 loc) · 5.52 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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
[tool.poetry]
name = "vkbottle"
version = "4.4.0-dev1"
description = "Homogenic! Customizable asynchronous VK API framework implementing comfort and speed"
authors = ["timoniq"]
maintainers = ["FeeeeK"]
license = "MIT"
readme = "README.md"
homepage = "https://github.com/vkbottle/vkbottle"
repository = "https://github.com/vkbottle/vkbottle"
keywords = [
"vk",
"vk-api",
"vkbottle",
"user-longpoll",
"async",
"asyncio",
"bot",
"longpoll-api",
"callback",
"middleware",
]
classifiers = [
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Quality Assurance",
"Typing :: Typed",
]
[tool.poetry.urls]
"Bug Tracker" = "https://github.com/vkbottle/vkbottle/issues"
[tool.poetry.dependencies]
python = "^3.8"
aiohttp = "^3.8.1"
choicelib = "^0.1.5"
pydantic = "^1.10.4"
vbml = "^1.1.post1"
vkbottle-types = "^5.131.146.14"
aiofiles = "23.1.0"
typing-extensions = "^4.4.0"
colorama = "^0.4.6"
[tool.poetry.group.dev.dependencies]
# Lint
black = "^23.1.0"
mypy = "^1.0.0"
mypy-extensions = "^1.0.0"
# mypy stubs
types-aiofiles = ">=22.1,<24.0"
# flake8, isort and autoflake replacement
ruff = ">=0.0.246,<0.0.265"
# Tests
pytest = "^7.2.1"
pytest-asyncio = ">=0.20.3,<0.22.0"
pytest-cov = "^4.0.0"
pytest-mock = "^3.10.0"
# Pre-commit
pre-commit = ">=2.19,<4.0"
[tool.poetry.group.docs.dependencies]
# Docs
mkdocs = "^1.4.2"
mkdocs-material = "^9.0.12"
mkdocs-redirects = "^1.2.0"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.pytest.ini_options]
asyncio_mode = "auto"
[tool.mypy]
python_version = 3.8
ignore_missing_imports = true
warn_no_return = false
warn_return_any = false
warn_unused_configs = true
check_untyped_defs = true
[[tool.mypy.overrides]]
# Ignore tests, because we can use fixtures that not quite represent a real type
module = "tests.*"
ignore_errors = true
[tool.black]
line-length = 99
target-version = ['py38']
[tool.ruff]
line-length = 99
respect-gitignore = true
target-version = "py38"
select = [
"PL", # pylint
"F", # pyflakes
"E", # pycodestyle errors
"W", # pycodestyle warnings
"C90", # mccabe
"I", # isort
"N", # pep8-naming
"YTT", # flake8-2020
"S", # flake8-bandit
"B", # flake8-bugbear
"A", # flake8-builtins
"C40", # flake8-comprehensions
"T10", # flake8-debugger
"EXE", # flake8-executable
"ISC", # flake8-implicit-str-concat
"ICN", # flake8-import-conventions
"G", # flake8-logging-format
"PIE", # flake8-pie
"T20", # flake8-print
"PT", # flake8-pytest-style
"SIM", # flake8-simplify
"TID", # flake8-tidy-imports
"TCH", # flake8-type-checking
"ARG", # flake8-unused-arguments
"PGH", # pygrep-hooks
"RSE", # flake8-raise
"RUF", # ruff
"ALL", # All not listed above
]
ignore = [
"ANN", # flake8-annotations
"BLE", # flake8-blind-except
"FBT", # flake8-boolean-trap
"COM", # flake8-commas
"DTZ", # flake8-datetimez
"DJ", # flake8-Django
"EM", # flake8-errmsg
"INP", # flake8-no-pep420
"PYI", # flake8-pyi
"Q", # flake8-quotes
"RET", # flake8-return
"PTH", # flake8-use-pathlib
"ERA", # flake8-eradicate
"PD", # pandas-vet
"D", # pydocstyle
"TRY", # tryceratops
"SLF", # flake8-self
# "E203", # whitespace before ':' (black)
"E501", # line too long
# "W503", # line break before binary operator (black)
# "W504", # line break after binary operator (black)
"B905", # `zip()` without an explicit `strict=` parameter (python3.10+ only)
"PLR0913", # Too many arguments to function call
"A003", # Class attribute builtin name shadowing
"N818", # Exception should be named with an Error suffix
"PGH003", # Use specific rule codes when ignoring type issues
"ARG002", # Unused method argument
"RUF001", # String contains ambiguous unicode character
"RUF002", # Docstring contains ambiguous unicode character
"RUF003", # Comment contains ambiguous unicode character
"PLW2901", # for loop variable overwritten by assignment target
"PLE1205", # https://github.com/charliermarsh/ruff/issues/3351
"B030", # Except handlers should only be exception classes or tuples of exception
"UP006", # Use `list` instead of `List` for type annotation
"UP007", # Use `X | Y` for type annotations
"S311", # Standard pseudo-random generators are not suitable for cryptographic purposes
"S301", # `pickle` and modules that wrap it can be unsafe when used to deserialize untrusted data, possible security issue
]
[tool.ruff.per-file-ignores]
"tests/**.py" = [
"S101", # Use of assert detected
"PLR2004", # Magic value used in comparison
"S106", # Possible hardcoded password
"ARG001", # Unused function argument
"ARG005", # Unused lambda argument
]
"examples/**.py" = [
"T201", # print statement found
"TCH001", # Move application import into a type-checking block
"TCH002" # Move third-party import out of a type-checking block
]
[tool.ruff.pep8-naming]
# Allow Pydantic's `@validator` decorator to trigger class method treatment.
classmethod-decorators = ["classmethod", "pydantic.validator", "pydantic.root_validator"]
[tool.ruff.flake8-type-checking]
exempt-modules = ["typing_extensions", "typing"]