From e29b3c964829a90446a3053914cf6e9729f95622 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E7=94=B5=E8=8A=BD=E8=A1=A3?= Date: Sun, 19 Jul 2026 15:03:51 -0400 Subject: [PATCH] fix(package): ship Python inline type metadata --- AGENTS.md | 1 + elydora/py.typed | 1 + pyproject.toml | 3 +++ tests/test_typing_distribution.py | 8 ++++++++ 4 files changed, 13 insertions(+) create mode 100644 elydora/py.typed create mode 100644 tests/test_typing_distribution.py diff --git a/AGENTS.md b/AGENTS.md index 94395c4..9230927 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -34,6 +34,7 @@ This repository owns the published `elydora` package, its CLI, synchronous and a ## Code Quality - Keep the package, distribution, and CLI version in `elydora/_version.py`; build metadata must read that literal through Setuptools dynamic metadata. +- Ship `elydora/py.typed` in every wheel and verify public annotations from an installed-wheel consumer. - Support every Python version declared in `pyproject.toml`. - Keep production source files at or below 500 lines. - Keep functions focused on one ownership boundary. diff --git a/elydora/py.typed b/elydora/py.typed new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/elydora/py.typed @@ -0,0 +1 @@ + diff --git a/pyproject.toml b/pyproject.toml index cdeebad..fef010f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,5 +42,8 @@ dev = [ [tool.setuptools.packages.find] include = ["elydora*"] +[tool.setuptools.package-data] +elydora = ["py.typed"] + [tool.setuptools.dynamic] version = {attr = "elydora._version.__version__"} diff --git a/tests/test_typing_distribution.py b/tests/test_typing_distribution.py new file mode 100644 index 0000000..fcc6695 --- /dev/null +++ b/tests/test_typing_distribution.py @@ -0,0 +1,8 @@ +from importlib.resources import files + + +def test_package_declares_inline_type_information() -> None: + marker = files("elydora").joinpath("py.typed") + + assert marker.is_file() + assert marker.read_text(encoding="utf-8").strip() == ""