fix: add PEP 561 py.typed marker to all Python packages (#973)

* fix: add PEP 561 py.typed marker to all Python packages

Add empty py.typed marker files to all 13 Python packages that were
missing them. Only hindsight-integrations/autogen already had one.

Per PEP 561, packages that wish to support type checking must include
a py.typed marker file. Without it, type checkers (mypy, pyright) treat
the package as untyped and skip all inline type annotations.

Fixes #965

* fix: ensure py.typed markers survive client regeneration

Add touch commands in generate-clients.sh to recreate PEP 561 py.typed
marker files after the OpenAPI generator runs, since the script deletes
and regenerates the hindsight_client_api directory.

---------

Co-authored-by: r266-tech <r266-tech@users.noreply.github.com>
This commit is contained in:
r266-tech 2026-04-11 05:24:46 +08:00 committed by GitHub
parent 1c32a7b928
commit d054b88403
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 5 additions and 0 deletions

View file

View file

View file

@ -148,6 +148,11 @@ if [ -f "$README_BACKUP" ]; then
rm "$README_BACKUP"
fi
# Create PEP 561 py.typed marker files for type checker support
echo "📦 Creating PEP 561 py.typed marker files..."
touch "$PYTHON_CLIENT_DIR/hindsight_client_api/py.typed"
touch "$PYTHON_CLIENT_DIR/hindsight_client/py.typed"
# Keep our custom pyproject.toml (don't let generator overwrite it)
if [ -f "setup.py" ]; then
echo "Note: setup.py generated but we're using pyproject.toml"