-
-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathpyproject.toml
More file actions
102 lines (86 loc) · 2.04 KB
/
Copy pathpyproject.toml
File metadata and controls
102 lines (86 loc) · 2.04 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 = "htmy"
dynamic = ["version"]
description = "Async, pure-Python server-side rendering engine."
authors = [{ name = "Peter Volf", email = "do.volfp@gmail.com" }]
license = "MIT"
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"anyio>=4.7.0,<5",
"markdown>=3.8,<4",
]
[project.optional-dependencies]
jinja = ["jinja2>=3.1.6", "markupsafe>=3.0.3"]
lxml = ["lxml>=6.0.0"]
all = ["htmy[jinja,lxml]"]
[dependency-groups]
dev = [
"fastapi>=0.137.0",
"fasthx>=3.1.0",
"mkdocstrings[python]>=1.0.4",
"mypy>=2.1.0,<3",
"poethepoet>=0.46.0",
"pytest>=9.1.0",
"pytest-random-order>=1.2.0",
"ruff>=0.15.17,<0.16",
"types-markdown>=3.10.2.20260518,<4",
"typing-extensions>=4.12.2,<5",
"trio>=0.33.0",
"types-lxml>=2026.2.16",
"zensical>=0.0.45",
"uvicorn>=0.50.0",
]
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
[tool.mypy]
strict = true
show_error_codes = true
explicit_package_bases = true
exclude = [
"examples/jinja-slots-fastapi",
"examples/snippet-slots-fastapi",
]
[tool.pdm.build]
excludes = ["tests/", "examples/"]
[tool.pdm.version]
source = "file"
path = "htmy/__init__.py"
[tool.pyright]
venvPath = "."
venv = ".venv"
[tool.pytest.ini_options]
addopts = "--random-order"
[tool.ruff]
line-length = 108
exclude = [
".git",
".mypy_cache",
".pytest_cache",
".ruff_cache",
".venv",
"dist",
"docs",
]
lint.select = [
"B", # flake8-bugbear
"C", # flake8-comprehensions
"E", # pycodestyle errors
"F", # pyflakes
"I", # isort
"S", # flake8-bandit - we must ignore these rules in tests
"W", # pycodestyle warnings
]
[tool.ruff.lint.per-file-ignores]
"tests/**/*" = ["S101"] # S101: use of assert detected
[tool.poe.tasks]
format = "ruff format --check ."
format-fix = "ruff format ."
lint = "ruff check ."
lint-fix = "ruff . --fix"
mypy = "mypy ."
check.sequence = ["format", "lint", "mypy"]
check.ignore_fail = "return_non_zero"
test = "python -m pytest tests"
serve-docs = "zensical serve"