-
Notifications
You must be signed in to change notification settings - Fork 9
/
pyproject.toml
74 lines (66 loc) · 1.67 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
[tool.poetry]
name = "fasthx"
version = "2.1.1"
description = "FastAPI server-side rendering with built-in HTMX support."
authors = ["Peter Volf <do.volfp@gmail.com>"]
readme = "README.md"
license = "MIT"
[tool.poetry.dependencies]
python = "^3.10"
fastapi = ">=0.100.0"
htmy = {version = ">=0.3.4", optional = true}
jinja2 = {version = "^3.0.0", optional = true}
[tool.poetry.extras]
htmy = ["htmy"]
jinja = ["jinja2"]
[tool.poetry.group.dev.dependencies]
htmy = ">=0.3.4"
httpx = "^0.26.0"
jinja2 = "^3.0.0"
mkdocs-material = "^9.5.32"
mkdocstrings = {extras = ["python"], version = "^0.25.2"}
mypy = "^1.13.0"
poethepoet = "^0.30.0"
pytest = "^8.3.3"
pytest-random-order = "^1.1.1"
ruff = "^0.7.4"
typing-extensions = ">=4.5.0"
uvicorn = "^0.32.0"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.mypy]
strict = true
show_error_codes = true
[tool.ruff]
line-length = 108
exclude = [
".git",
".mypy_cache",
".pytest_cache",
".ruff_cache",
".venv",
"dist",
"docs",
]
lint.select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"S", # flake8-bandit - we must ignore these rules in tests
"C", # flake8-comprehensions
"B", # flake8-bugbear
]
[tool.ruff.lint.per-file-ignores]
"tests/**/*" = ["S101"] # S101: use of assert detected
[tool.poe.tasks]
check-format = "ruff format --check ."
format = "ruff format ."
lint = "ruff check ."
lint-fix = "ruff . --fix"
mypy = "mypy ."
test = "python -m pytest tests --random-order"
static-checks.sequence = ["lint", "check-format", "mypy"]
static-checks.ignore_fail = "return_non_zero"
serve-docs = "mkdocs serve"