-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
119 lines (99 loc) · 3.61 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
[project]
name = "ktx"
version = "0.2.3"
description = "context library"
authors = [
{ name = "KTS", email = "[email protected]" }
]
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 = [
"immutabledict",
"typing-extensions; python_version < '3.11'",
]
[project.optional-dependencies]
all = [
"sentry-sdk>=2.11.0",
"opentelemetry-api",
]
test = [
"coverage>=7.6.1",
"pytest",
"mypy",
"ruff",
"deptry",
]
[build-system]
requires = ["setuptools>=61.0.0", "wheel"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
exclude = ["tests*"]
[tool.setuptools.package-data]
ktx = ["py.typed"]
[[tool.mypy.overrides]]
module = '*.*'
ignore_missing_imports = true
check_untyped_defs = true
[tool.pytest.ini_options]
[tool.deptry.per_rule_ignores]
DEP002 = ["mypy", "ruff", "deptry", "coverage"]
[tool.deptry.package_module_name_map]
immutabledict = "immutabledict"
sentry-sdk = "sentry_sdk"
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"]
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"]