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:
parent
1c32a7b928
commit
d054b88403
14 changed files with 5 additions and 0 deletions
0
hindsight-all/hindsight/py.typed
Normal file
0
hindsight-all/hindsight/py.typed
Normal file
0
hindsight-api-slim/hindsight_api/py.typed
Normal file
0
hindsight-api-slim/hindsight_api/py.typed
Normal file
0
hindsight-clients/python/hindsight_client/py.typed
Normal file
0
hindsight-clients/python/hindsight_client/py.typed
Normal file
0
hindsight-clients/python/hindsight_client_api/py.typed
Normal file
0
hindsight-clients/python/hindsight_client_api/py.typed
Normal file
0
hindsight-embed/hindsight_embed/py.typed
Normal file
0
hindsight-embed/hindsight_embed/py.typed
Normal file
0
hindsight-integrations/ag2/hindsight_ag2/py.typed
Normal file
0
hindsight-integrations/ag2/hindsight_ag2/py.typed
Normal file
0
hindsight-integrations/agno/hindsight_agno/py.typed
Normal file
0
hindsight-integrations/agno/hindsight_agno/py.typed
Normal file
0
hindsight-integrations/crewai/hindsight_crewai/py.typed
Normal file
0
hindsight-integrations/crewai/hindsight_crewai/py.typed
Normal file
|
|
@ -148,6 +148,11 @@ if [ -f "$README_BACKUP" ]; then
|
||||||
rm "$README_BACKUP"
|
rm "$README_BACKUP"
|
||||||
fi
|
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)
|
# Keep our custom pyproject.toml (don't let generator overwrite it)
|
||||||
if [ -f "setup.py" ]; then
|
if [ -f "setup.py" ]; then
|
||||||
echo "Note: setup.py generated but we're using pyproject.toml"
|
echo "Note: setup.py generated but we're using pyproject.toml"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue