From d054b884035ac2956e5c9fa8b88828492b1ba4c9 Mon Sep 17 00:00:00 2001 From: r266-tech Date: Sat, 11 Apr 2026 05:24:46 +0800 Subject: [PATCH] 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 --- hindsight-all/hindsight/py.typed | 0 hindsight-api-slim/hindsight_api/py.typed | 0 hindsight-clients/python/hindsight_client/py.typed | 0 hindsight-clients/python/hindsight_client_api/py.typed | 0 hindsight-embed/hindsight_embed/py.typed | 0 hindsight-integrations/ag2/hindsight_ag2/py.typed | 0 hindsight-integrations/agno/hindsight_agno/py.typed | 0 hindsight-integrations/crewai/hindsight_crewai/py.typed | 0 .../langgraph/hindsight_langgraph/py.typed | 0 hindsight-integrations/litellm/hindsight_litellm/py.typed | 0 .../llamaindex/hindsight_llamaindex/py.typed | 0 .../pydantic-ai/hindsight_pydantic_ai/py.typed | 0 hindsight-integrations/strands/hindsight_strands/py.typed | 0 scripts/generate-clients.sh | 5 +++++ 14 files changed, 5 insertions(+) create mode 100644 hindsight-all/hindsight/py.typed create mode 100644 hindsight-api-slim/hindsight_api/py.typed create mode 100644 hindsight-clients/python/hindsight_client/py.typed create mode 100644 hindsight-clients/python/hindsight_client_api/py.typed create mode 100644 hindsight-embed/hindsight_embed/py.typed create mode 100644 hindsight-integrations/ag2/hindsight_ag2/py.typed create mode 100644 hindsight-integrations/agno/hindsight_agno/py.typed create mode 100644 hindsight-integrations/crewai/hindsight_crewai/py.typed create mode 100644 hindsight-integrations/langgraph/hindsight_langgraph/py.typed create mode 100644 hindsight-integrations/litellm/hindsight_litellm/py.typed create mode 100644 hindsight-integrations/llamaindex/hindsight_llamaindex/py.typed create mode 100644 hindsight-integrations/pydantic-ai/hindsight_pydantic_ai/py.typed create mode 100644 hindsight-integrations/strands/hindsight_strands/py.typed diff --git a/hindsight-all/hindsight/py.typed b/hindsight-all/hindsight/py.typed new file mode 100644 index 00000000..e69de29b diff --git a/hindsight-api-slim/hindsight_api/py.typed b/hindsight-api-slim/hindsight_api/py.typed new file mode 100644 index 00000000..e69de29b diff --git a/hindsight-clients/python/hindsight_client/py.typed b/hindsight-clients/python/hindsight_client/py.typed new file mode 100644 index 00000000..e69de29b diff --git a/hindsight-clients/python/hindsight_client_api/py.typed b/hindsight-clients/python/hindsight_client_api/py.typed new file mode 100644 index 00000000..e69de29b diff --git a/hindsight-embed/hindsight_embed/py.typed b/hindsight-embed/hindsight_embed/py.typed new file mode 100644 index 00000000..e69de29b diff --git a/hindsight-integrations/ag2/hindsight_ag2/py.typed b/hindsight-integrations/ag2/hindsight_ag2/py.typed new file mode 100644 index 00000000..e69de29b diff --git a/hindsight-integrations/agno/hindsight_agno/py.typed b/hindsight-integrations/agno/hindsight_agno/py.typed new file mode 100644 index 00000000..e69de29b diff --git a/hindsight-integrations/crewai/hindsight_crewai/py.typed b/hindsight-integrations/crewai/hindsight_crewai/py.typed new file mode 100644 index 00000000..e69de29b diff --git a/hindsight-integrations/langgraph/hindsight_langgraph/py.typed b/hindsight-integrations/langgraph/hindsight_langgraph/py.typed new file mode 100644 index 00000000..e69de29b diff --git a/hindsight-integrations/litellm/hindsight_litellm/py.typed b/hindsight-integrations/litellm/hindsight_litellm/py.typed new file mode 100644 index 00000000..e69de29b diff --git a/hindsight-integrations/llamaindex/hindsight_llamaindex/py.typed b/hindsight-integrations/llamaindex/hindsight_llamaindex/py.typed new file mode 100644 index 00000000..e69de29b diff --git a/hindsight-integrations/pydantic-ai/hindsight_pydantic_ai/py.typed b/hindsight-integrations/pydantic-ai/hindsight_pydantic_ai/py.typed new file mode 100644 index 00000000..e69de29b diff --git a/hindsight-integrations/strands/hindsight_strands/py.typed b/hindsight-integrations/strands/hindsight_strands/py.typed new file mode 100644 index 00000000..e69de29b diff --git a/scripts/generate-clients.sh b/scripts/generate-clients.sh index 06e22b44..abf01c57 100755 --- a/scripts/generate-clients.sh +++ b/scripts/generate-clients.sh @@ -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"