-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
102 lines (95 loc) · 2.62 KB
/
Copy pathpyproject.toml
File metadata and controls
102 lines (95 loc) · 2.62 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
[project]
name = "chat-app"
version = "0"
description = "Reference chat application for the modern-python organisation"
readme = "readme.md"
requires-python = ">=3.14"
authors = [{ name = "Artur Shiriev", email = "me@shiriev.ru" }]
license = "MIT"
dependencies = [
"litestar[jwt]",
"lite-bootstrap[litestar-all]",
"modern-di-litestar>=3,<4",
"advanced-alchemy",
"pydantic-settings",
"granian[uvloop]",
"argon2-cffi",
"db-retry",
# database
"alembic",
"alembic-postgresql-enum",
"psycopg2",
"sqlalchemy[asyncio]",
"asyncpg",
# tracing
"opentelemetry-instrumentation-asyncpg",
"opentelemetry-instrumentation-sqlalchemy",
]
[dependency-groups]
dev = [
"polyfactory",
"httpx",
"pytest",
"pytest-cov",
"pytest-asyncio",
"asgi_lifespan",
"modern-di-pytest>=3,<4",
"pytest-alembic",
]
lint = ["ruff", "ty", "eof-fixer"]
[tool.ruff]
fix = true
unsafe-fixes = true
line-length = 120
target-version = "py314"
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"D1",
"FBT",
"INP",
"B008",
"ANN204",
"RUF001",
"D203",
"D213",
"COM812",
"ISC001",
"S105",
"TC001",
"TC002",
"TC003",
"CPY001", # allow missing copyright notice
]
isort.lines-after-imports = 2
isort.no-lines-before = ["standard-library", "local-folder"]
# Handlers and tests take their dependencies as parameters - Litestar binds path/query/DI
# params by name, pytest binds fixtures by name - so the default limit of 5 flags ordinary
# code. max-positional-args defaults to this, which covers PLR0917 as well.
pylint.max-args = 10
[tool.ruff.lint.extend-per-file-ignores]
"tests/*.py" = ["S101", "PLR2004"]
"migrations/*.py" = ["ERA001"]
[tool.pytest.ini_options]
addopts = "--cov=. --cov-report term-missing --cov-fail-under=100 --ignore=tests/migrations"
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
filterwarnings = ["error"]
[tool.coverage.report]
exclude_also = ["if typing.TYPE_CHECKING:"]
[tool.coverage.run]
concurrency = ["thread", "greenlet"]
disable_warnings = ["couldnt-parse"]
omit = [
"migrations/*",
# Excluded from the default pytest run (see addopts) because they cycle the schema; they
# run under `just test-migrations` instead, where coverage is off.
"tests/migrations/*",
"app/api/__main__.py",
# No __init__.py under planning/ (see the comment atop planning/index.py), so coverage's
# package walk never reaches these on its own - omit them explicitly rather than relying
# on that as an accident of discovery.
"planning/index.py",
"planning/links.py",
"docs/adr/check.py",
]