-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
94 lines (81 loc) · 2.83 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
[tool.poetry]
name = "ydb-dbapi"
version = "0.1.7" # AUTOVERSION
description = "YDB Python DBAPI which complies with PEP 249"
authors = ["Yandex LLC <ydb@yandex-team.ru>"]
readme = "README.md"
repository = "https://github.com/ydb-platform/ydb-python-dbapi/"
[tool.poetry.dependencies]
python = "^3.8"
ydb = "^3.18.13"
[tool.poetry.group.dev.dependencies]
pre-commit = "^3.5.0"
ruff = "^0.6.9"
mypy = "^1.11.2"
poethepoet = "0.28.0"
types-protobuf = "^5.28.0.20240924"
testcontainers = "^3.7.1"
pytest = "^8.3.3"
pytest-asyncio = "^0.24.0"
sqlalchemy = "^2.0.36"
greenlet = "^3.1.1"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.poe.tasks]
mypy = "mypy ydb_dbapi"
ruff-fix = "ruff check --fix"
ruff = "ruff check"
lint = ["mypy", "ruff"]
format-check = "ruff format --check"
format = "ruff format"
tests = "pytest"
[tool.ruff]
exclude = [".venv", ".git", ".github/scripts", "__pycache__", "build", "dist", "venv"]
line-length = 79
target-version = "py39"
src = ["ydb_dbapi", "tests"]
[tool.ruff.lint]
ignore = [
"D", # Allow not to have docstring for each method
"ANN101", # Allow not to specify `Self` type for `self` param
"ANN102", # Allow not to specify `Class` type for `cls` param
"ANN401", # Allow to use Any type
"FIX002", # Allow to use TODO in code
"TD001", # Allow to specify FIXME (still trigger FIX001)
"TD002", # Allow not to specify author of todo
"TD003", # Allow not to specify ticket of todo (it doesn't work)
"PERF401", # Allow not to use list comprehension each time
"FBT", # Allow boolean positional arguments
"TCH002", # Allow not to use `if TYPE_CHECKING` for all imports, which don't used explicitly
"TCH003", # Allow not to use `if TYPE_CHECKING` for std lib imports
"ISC001", # Conflicts with formatter
"COM812", # Conflicts with formatter,
# Ignores below could be deleted
"EM101", # Allow to use string literals in exceptions
"TRY003", # Allow specifying long messages outside the exception class
"SLF001", # Allow access private member,
"PGH003", # Allow not to specify rule codes
"PLR0913", # Allow to have many arguments in function definition
]
select = ["ALL"]
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = ["B"]
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.lint.isort]
force-single-line = true
[tool.ruff.lint.per-file-ignores]
"**/test_*.py" = ["S", "SLF", "ANN201", "ARG", "PLR2004", "PT012"]
"conftest.py" = ["S", "ARG001"]
"__init__.py" = ["F401", "F403"]
[tool.pytest.ini_options]
asyncio_mode = "auto"
addopts = "--tb native -v -r fxX -p no:warnings"
[[tool.mypy.overrides]]
module = "ydb.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "ydb_dbapi.errors"
ignore_errors = true