Because the script to figure out the package installation directory & add py.typed to it needs to be run twice, I decided to put it into its own .py file and reference it via github.action-path instead of running it inline via jannekem/run-python-script-action like the existing Python script in the Action. At a later point, it might make sense to turn this into an Action of its own and depend on it here (e.g. if Mypy gets a similar type completeness checking feature).
This PR implements approach 2.ii from https://github.com/Bibo-Joshi/pyright-type-completeness/issues/5#issuecomment-2366812746.
Because the script to figure out the package installation directory & add
py.typed
to it needs to be run twice, I decided to put it into its own.py
file and reference it viagithub.action-path
instead of running it inline viajannekem/run-python-script-action
like the existing Python script in the Action. At a later point, it might make sense to turn this into an Action of its own and depend on it here (e.g. if Mypy gets a similar type completeness checking feature).You can see that it works here:
And see that the old behavior if
add-py-typed
is omitted still works as before (if apy.typed
marker is present in the actual repo) here:Fixes #5