-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
93 lines (82 loc) · 3.16 KB
/
Copy pathpyproject.toml
File metadata and controls
93 lines (82 loc) · 3.16 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
[project]
name = "django-ydb-backend"
version = "0.0.1b6" # AUTOVERSION
description = "Django backend for YDB"
authors = [
{name = "Yandex LLC", email = "ydb@yandex-team.ru"},
]
readme = "README.md"
requires-python = ">=3.10,<4"
dependencies = [
"ydb-dbapi (>=0.1.8,<0.2.0)",
"django (>=4.2,<7.0)"
]
[tool.poetry]
packages = [
{ include = "ydb_backend" },
]
[tool.poetry.group.dev.dependencies]
ruff = "^0.9.9"
pytest-cov = "<4.0.0"
[tool.poetry.group.docs]
optional = true
[tool.poetry.group.docs.dependencies]
sphinx = "^7.0.0"
sphinx-rtd-theme = "^2.0.0"
myst-parser = "^2.0.0"
sphinx-copybutton = "^0.5.0"
[build-system]
requires = ["poetry-core>=2.0.0,<3.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.ruff]
exclude = [".venv", ".git", ".github/scripts", "__pycache__", "build", "dist", "venv", "examples", "docs"]
line-length = 88
target-version = "py310"
src = ["ydb_backend", "tests"]
[tool.ruff.lint]
ignore = [
"D", # Allow not to have docstring for each method
"ANN", # Allow not to have annotations,
"ARG002", # Allow to have unused method arguments
"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
"TC002", # Allow not to use `if TYPE_CHECKING` for all imports, which don't used explicitly
"TC003", # Allow not to use `if TYPE_CHECKING` for std lib imports
"ISC001", # Conflicts with formatter
"COM812", # Conflicts with formatter
"PLR0911", # Allow to have too many return statements
"PT009", # We use Django asserts
"S608", # Possible SQL injection vector through string-based query construction"
"C901", # `as_sql` is too complex (30 > 10)
"PLR0912", # Too many branches (33 > 12)
"PLR0915", # Too many statements (106 > 50)
# Ignores below could be deleted
"PYI024", # Use `typing.NamedTuple` instead of `collections.namedtuple`
"TID252", # Prefer absolute imports over relative imports from parent modules
"PT027", # `pytest.raises` instead of unittest-style `assertRaises`
"ERA001", # Found commented-out code
"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
"RUF012", # Allow not to annotate mutable class attributes
]
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"]
# Migration modules follow Django's numeric naming convention (0001_initial).
"**/migrations_*/*.py" = ["N999"]