-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
150 lines (139 loc) · 3.04 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
[tool.poetry]
name = "vintasend-sqlalchemy"
version = "0.1.0"
description = "A flexible package for implementing transactional notifications"
authors = ["Hugo bessa <[email protected]>"]
license = "MIT"
readme = "README.md"
[tool.poetry.dependencies]
python = "<3.13,>=3.10"
sqlalchemy = "^2.0.36"
vintasend = { git = "https://github.com/vintasoftware/vintasend.git", branch = "main" }
alembic = "^1.14.0"
[tool.poetry.group.dev.dependencies]
freezegun = "^1.5.1"
coverage = "^7.6.4"
tox = "^4.23.2"
pytest = "^8.3.3"
pytest-xdist = {version = "^3.6.1", extras=["psutil"]}
coveralls = "^4.0.1"
pytest-cov = "^6.0.0"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.ruff]
select = [
# pycodestyle
"E",
# Pyflakes
"F",
# pep8-naming
"N",
# pyupgrade
"UP",
# flake8-bugbear
"B",
# flake8-bandit
"S",
# flake8-blind-except
"BLE",
# flake8-builtins
"DJ",
# isort
"I",
# flake8-logging-format
"G",
# flake8-no-pep420
"INP",
# Ruff-specific rules
"RUF",
]
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
"virtualenvs",
"*/migrations/*",
]
ignore = [
# Disable eradicate (commented code removal)
"ERA001",
# Disable Conflicting lint rules,
# see https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
"W191",
"E501",
"E111",
"E117",
"D206",
"D300",
"Q000",
"Q001",
"Q002",
"Q003",
"COM812",
"COM819",
"ISC001",
"ISC002",
# Allow `except Exception`:
"BLE001",
# Disable unused `noqa` directive
"RUF100",
]
line-length = 100
indent-width = 4
target-version = "py312"
# Allow unused variables when underscore-prefixed:
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.pycodestyle]
ignore-overlong-task-comments = true
[tool.ruff.lint.isort]
section-order = [
"future",
"standard-library",
"third-party",
"first-party",
"local-folder",
]
lines-after-imports = 2
[tool.ruff.per-file-ignores]
# Ignore "E402", "F403", "F405" (import violations) in __init__.py files.
# Ignore "S" (flake8-bandit) and "N802" (function name should be lowercase) in tests and docs.
# Ignore "RUF" (Ruff-specific rules) and "I" (isort) in migrations.
"__init__.py" = ["E402", "F403", "F405"]
"**/{tests,docs}/*" = ["E402", "F403", "F405", "S", "N802"]
"**/*test*.py" = ["E402", "F403", "F405", "S", "N802"]
"**/{settings}/*" = ["E402", "F403", "F405"]
"**/migrations/*" = ["RUF", "I"]
[tool.coverage.run]
branch = true
source = ["backend"]
omit = [
"**/venv/*",
"**/env/*",
"**/virtualenvs/*",
"**/node_modules/*",
"**/migrations/*",
"**/settings/*",
"**/tests/*",
]
[tool.pytest.ini_options]
python_files = ["test_*.py"]
addopts = "--dist=loadscope"