-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
137 lines (114 loc) · 3.89 KB
/
pyproject.toml
File metadata and controls
137 lines (114 loc) · 3.89 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
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
[project]
name = "extapi"
version = "0.1.7"
description = "External API library"
authors = [
{ name = "KTS", email = "hello@kts.tech" }
]
license = {file = "LICENSE"}
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers = [
"Development Status :: 5 - Production/Stable",
"Framework :: AsyncIO",
"Operating System :: POSIX",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Intended Audience :: Developers",
"Topic :: Software Development :: Libraries :: Python Modules",
]
requires-python = '>=3.10.0'
readme = "README.md"
dependencies = [
"multidict",
"yarl",
"typing-extensions; python_version < '3.11'",
]
[project.optional-dependencies]
aiohttp = [
"aiohttp",
]
httpx = [
"httpx",
]
opentelemetry = [
"opentelemetry-api",
"opentelemetry-semantic-conventions",
]
prometheus = [
"prometheus_client",
]
tests = [
"pytest",
"pytest-asyncio",
"pytest-aiohttp",
"pytest-mock",
"coverage",
"mypy",
"ruff",
"deptry",
"opentelemetry-sdk",
]
[build-system]
requires = ["setuptools>=61.0.0", "wheel"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
exclude = ["tests*"]
[tool.setuptools.package-data]
extapi = ["py.typed"]
[[tool.mypy.overrides]]
module = '*.*'
ignore_missing_imports = true
check_untyped_defs = true
[tool.pytest.ini_options]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
[tool.deptry.per_rule_ignores]
DEP002 = ["pytest-asyncio", "coverage", "pytest-aiohttp", "mypy", "ruff", "deptry"]
DEP004 = []
[tool.deptry.package_module_name_map]
opentelemetry-api = "opentelemetry"
[tool.ruff.format]
# Аналогично black, двойные кавычки
quote-style = "double"
# Аналогично black, пробелы вместо табов
indent-style = "space"
# Аналогично black, уважаем trailing commas
skip-magic-trailing-comma = false
# Аналогично black, автоматически определяем подходящее окончание строки.
line-ending = "auto"
[tool.ruff.lint]
# Список кодов или префиксов правил, которые следует считать исправляемыми. (https://docs.astral.sh/ruff/settings/#fixable)
# По умолчанию все правила считаются исправляемыми.
fixable = ["I", "RUF022", "RUF023", "F401"]
preview = true
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"C", # flake8-comprehensions
"B", # flake8-bugbear
]
ignore = [
"E501", # line too long, handled by black
"B008", # do not perform function calls in argument defaults
"C901", # too complex
]
[tool.ruff.lint.isort]
# Позволяет использовать as в комбинации с группировкой (https://docs.astral.sh/ruff/settings/#isort-combine-as-imports)
#from package import (
# func1 as foo,
# func2 as boo,
#)
combine-as-imports = true
# Воспринимать следующие пакеты в качестве stdlib (https://docs.astral.sh/ruff/settings/#isort-extra-standard-library)
extra-standard-library = ["typing_extensions"]
# Не добавлять пустую строку перед данными секциям (https://docs.astral.sh/ruff/settings/#isort-no-lines-before)
no-lines-before = []
[tool.ruff.lint.pep8-naming]
# если навесить данные декораторы, то можно использовать cls (https://docs.astral.sh/ruff/settings/#pep8-naming-classmethod-decorators)
# в качестве первого аргумента.
classmethod-decorators = ["cached_classproperty", "classproperty"]