-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
169 lines (158 loc) · 3.91 KB
/
Copy pathpyproject.toml
File metadata and controls
169 lines (158 loc) · 3.91 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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
[tool.poetry]
name = "vintasend-sqlalchemy"
version = "2.0.0"
description = "SQLAlchemy backend implementation for VintaSend"
authors = ["Hugo bessa <hugo@vinta.com.br>"]
license = "MIT"
readme = "README.md"
packages = [{ include = "vintasend_sqlalchemy" }]
include = [
{ path = "vintasend_sqlalchemy/py.typed", format = "wheel" }
]
[tool.poetry.dependencies]
python = "<3.15,>=3.10"
sqlalchemy = "^2.0.51"
vintasend = "^2.0.0"
alembic = "^1.18.5"
greenlet = "^3.5.4"
[tool.poetry.group.dev.dependencies]
aiosqlite = "^0.22.1"
freezegun = "^1.5.5"
coverage = "^7.14.1"
tox = "^4.55.0"
pytest = "^9.0.3"
pytest-asyncio = "^1.4.0"
pytest-xdist = {version = "^3.8.0", extras=["psutil"]}
pytest-cov = "^7.1.0"
ruff = "^0.15.22"
mypy = "^2.3.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
# Must track the MINIMUM Python in [tool.poetry.dependencies]. A higher target lets pyupgrade
# rewrite code into syntax that breaks the older interpreters we still support (py310+), e.g.
# `datetime.UTC` (3.11+) or PEP 695 `class Foo[T]` generics (3.12+).
target-version = "py310"
# 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/*",
# Alembic-invoked migration helpers: run via Alembic's own exec() during test setup, so
# coverage cannot attribute them reliably. Excluded to keep the report meaningful.
"**/alembic_initial_migration_ops.py",
]
[tool.pytest.ini_options]
python_files = ["test_*.py"]
addopts = "--dist=loadscope"
# The async suite drives its own event loop through session-scoped fixtures, so pin the
# fixture loop scope to silence pytest-asyncio 1.x's "unset loop scope" warning and keep
# a single loop across the session.
asyncio_mode = "strict"
asyncio_default_fixture_loop_scope = "session"