From 5a09d4b7ca31b3ee0bd99ef32890d00723799bad Mon Sep 17 00:00:00 2001 From: Peter Corke Date: Tue, 17 Nov 2026 17:43:02 +1000 Subject: [PATCH] chore: ship a py.typed marker (PEP 561) Type checkers ignore the annotations of an installed package unless it carries a py.typed marker. mypy src is clean on the project settings, and hatch includes the file in both the wheel and the sdist (checked from a clean copy, and with a mypy consumer in a throwaway venv, with and without the marker). Fixes #80 Co-Authored-By: Claude Sonnet 5.5 --- CHANGELOG.md | 6 ++++++ src/pgraph/py.typed | 0 2 files changed, 6 insertions(+) create mode 100644 src/pgraph/py.typed diff --git a/CHANGELOG.md b/CHANGELOG.md index 27666681..9ec49586 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ Unreleased +Packaging + +- The package now ships a `py.typed` marker (PEP 561), so mypy, Pyright and + Pylance use pgraph's type annotations instead of treating it as untyped. + The annotations pass `mypy src` on the project's own settings. + Behaviour change - `Graph.plot()` and `Graph.highlight_path()` now default to `block=None` diff --git a/src/pgraph/py.typed b/src/pgraph/py.typed new file mode 100644 index 00000000..e69de29b