Skip to content

Commit 99c2018

Browse files
authored
Merge pull request #5 from contiguity/remove-htmlmin
Remove htmlmin dependency
2 parents 3f1bceb + b774b89 commit 99c2018

File tree

4 files changed

+12
-23
lines changed

4 files changed

+12
-23
lines changed

pyproject.toml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,21 @@ classifiers = [
3434
"Typing :: Typed",
3535
]
3636
dependencies = [
37-
"htmlmin>=0.1.12",
3837
"httpx>=0.27.2",
3938
"phonenumbers>=8.13.47,<9.0.0",
4039
"pydantic>=2.9.0,<3.0.0",
4140
"typing-extensions>=4.12.2,<5.0.0",
4241
]
4342

43+
[dependency-groups]
44+
dev = [
45+
"pre-commit~=3.8.0",
46+
"pytest~=8.3.3",
47+
"pytest-cov~=5.0.0",
48+
"python-dotenv~=1.0.1",
49+
"pytest-asyncio~=0.24.0",
50+
]
51+
4452
[project.urls]
4553
Repository = "https://github.com/contiguity/python"
4654

@@ -50,15 +58,6 @@ package-data = {contiguity = ["py.typed"]}
5058
[tool.setuptools.dynamic]
5159
version = {attr = "contiguity.__version__"}
5260

53-
[tool.uv]
54-
dev-dependencies = [
55-
"pre-commit~=3.8.0",
56-
"pytest~=8.3.3",
57-
"pytest-cov~=5.0.0",
58-
"python-dotenv~=1.0.1",
59-
"pytest-asyncio~=0.24.0",
60-
]
61-
6261
[tool.ruff]
6362
src = ["src"]
6463
line-length = 119

src/contiguity/send.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
from typing import TYPE_CHECKING, overload
55

66
import phonenumbers
7-
from htmlmin import minify
87
from pydantic import BaseModel
98

109
from ._common import Crumbs # noqa: TCH001 Pydantic needs this to be outside of the TYPE_CHECKING block.
@@ -125,7 +124,7 @@ def email( # noqa: PLR0913
125124
"to": to,
126125
"from": from_,
127126
"subject": subject,
128-
"body": minify(html) if html else text,
127+
"body": html or text,
129128
"contentType": "html" if html else "text",
130129
}
131130

src/contiguity/template.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@
22

33
from pathlib import Path
44

5-
from htmlmin import minify
65
from typing_extensions import Never
76

87

98
class Template:
109
def local(self, file_path: Path | str) -> str:
1110
try:
1211
file_path = Path(file_path)
13-
return minify(file_path.read_text())
12+
return file_path.read_text()
1413
except OSError as exc:
1514
msg = "reading files is not supported in the this environment"
1615
raise ValueError(msg) from exc

uv.lock

Lines changed: 1 addition & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)