Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,21 @@ classifiers = [
"Typing :: Typed",
]
dependencies = [
"htmlmin>=0.1.12",
"httpx>=0.27.2",
"phonenumbers>=8.13.47,<9.0.0",
"pydantic>=2.9.0,<3.0.0",
"typing-extensions>=4.12.2,<5.0.0",
]

[dependency-groups]
dev = [
"pre-commit~=3.8.0",
"pytest~=8.3.3",
"pytest-cov~=5.0.0",
"python-dotenv~=1.0.1",
"pytest-asyncio~=0.24.0",
]

[project.urls]
Repository = "https://github.com/contiguity/python"

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

[tool.uv]
dev-dependencies = [
"pre-commit~=3.8.0",
"pytest~=8.3.3",
"pytest-cov~=5.0.0",
"python-dotenv~=1.0.1",
"pytest-asyncio~=0.24.0",
]

[tool.ruff]
src = ["src"]
line-length = 119
Expand Down
3 changes: 1 addition & 2 deletions src/contiguity/send.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from typing import TYPE_CHECKING, overload

import phonenumbers
from htmlmin import minify
from pydantic import BaseModel

from ._common import Crumbs # noqa: TCH001 Pydantic needs this to be outside of the TYPE_CHECKING block.
Expand Down Expand Up @@ -125,7 +124,7 @@ def email( # noqa: PLR0913
"to": to,
"from": from_,
"subject": subject,
"body": minify(html) if html else text,
"body": html or text,
"contentType": "html" if html else "text",
}

Expand Down
3 changes: 1 addition & 2 deletions src/contiguity/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@

from pathlib import Path

from htmlmin import minify
from typing_extensions import Never


class Template:
def local(self, file_path: Path | str) -> str:
try:
file_path = Path(file_path)
return minify(file_path.read_text())
return file_path.read_text()
except OSError as exc:
msg = "reading files is not supported in the this environment"
raise ValueError(msg) from exc
Expand Down
10 changes: 1 addition & 9 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading