Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
209 lines (185 loc) · 4.36 KB
/
Copy pathpyproject.toml
File metadata and controls
209 lines (185 loc) · 4.36 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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
[project]
name = "taskiq-postgres"
version = "0.6.1"
description = "PostgreSQL integration for taskiq"
summary = "PostgreSQL integration for taskiq"
readme = "README.md"
license = "MIT"
license-files = ["LICENSE"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Framework :: AsyncIO",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development",
"Topic :: System :: Networking",
"Typing :: Typed",
"Operating System :: OS Independent",
]
keywords = ["taskiq", "tasks", "distributed", "async", "postgresql"]
authors = [
{name = "Anfimov Dima", email = "lovesolaristics@gmail.com"}
]
requires-python = ">=3.11,<3.15"
dependencies = [
"taskiq>=0.13.0",
]
[project.urls]
"Bug Tracker" = "https://github.com/danfimov/taskiq-postgres/issues"
"Repository" = "https://github.com/danfimov/taskiq-postgres/"
[project.optional-dependencies]
aiopg = [
"aiopg>=1.4.0",
]
asyncpg = [
"asyncpg>=0.31.0",
]
psqlpy = [
"psqlpy>=0.12.1",
]
psycopg = [
"psycopg[binary,pool]>=3.3.5",
]
[dependency-groups]
dev = [
{include-group = "lint"},
{include-group = "test"},
{include-group = "docs"},
"prek>=0.5.2",
]
lint = [
"ruff>=0.16.7",
"codespell>=2.4.3",
"zizmor>=1.30.1",
# type check
"ty>=0.0.80",
"mypy>=2.3.1",
"asyncpg-stubs>=0.31.0",
]
test = [
"polyfactory>=3.3.0",
"pytest>=9.1.1",
"pytest-asyncio>=1.4.0",
"pytest-cov>=7.1.0",
# for database in tests
"sqlalchemy-utils>=0.42.1",
# for faster asyncio loop in tests
"uvloop>=0.22.1",
]
docs = [
"mkdocstrings-python>=2.0.8",
"zensical>=0.0.62",
]
[build-system]
requires = ["uv_build>=0.12,<0.13"]
build-backend = "uv_build"
[tool.uv.build-backend]
module-name = "taskiq_pg"
[tool.pytest.ini_options]
pythonpath = [
"."
]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
markers = [
"unit: marks unit tests",
"integration: marks tests with real infrastructure env",
]
filterwarnings = [
# psqlpy upstream shutdown problem
"ignore:coroutine 'PSQLPyBroker._notification_handler' was never awaited:RuntimeWarning",
]
[tool.coverage.report]
exclude_lines = [
"# pragma: no cover",
"def __repr__",
"def __str__",
"def __unicode__",
"if tp.TYPE_CHECKING:",
]
show_missing = true
skip_empty = true
omit = [
"*/__init__.py",
"venv/*",
"tests/*"
]
[tool.ruff]
line-length = 120
target-version = "py310"
[tool.ruff.lint]
select = ["ALL"]
ignore = [
# TODO: enable this rules
"TRY301",
"ANN401",
# "PERF203",
# boolean args
"FBT001",
"FBT002",
# Docstrings
"D104", # in public package
"D100", # in public module
# Conflicted rules
"D203", # with D211
"D212", # with D213
"COM812", # with formatter
"EM101",
"TRY003",
"CPY001", # copyright notice
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = [
# Docstrings
"D103",
"D100",
# Strange rules about boolean args
"FBT001",
"FBT002",
"S101", # assert usage
"S311", # pseudo-random generators are not suitable for cryptographic purposes
"S608",
"RUF",
"PLR2004", # magic numbers in tests
"ANN", # missing type annotations in tests
]
"tests/test_linting.py" = [
"S603", # subprocess usage
]
"examples/*" = [
"T201",
"D",
"ANN",
"INP001",
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.isort]
known-local-folder = ["taskiq_pg"]
lines-after-imports = 2
[tool.ruff.lint.pylint]
max-args = 9
[tool.mypy]
python_version = "3.10"
modules = "taskiq_pg"
exclude_gitignore = true
platform = "linux"
follow_imports = "normal"
ignore_missing_imports = false
mypy_path = "stubs"
disallow_untyped_defs = true
warn_return_any = true
warn_unreachable = true
warn_no_return = true
warn_unused_ignores = true
warn_redundant_casts = true