Bibo-Joshi / pyright-type-completeness

Composite Action to Verify Type Completeness with pyright
MIT License
1 stars 1 forks source link

Add `add-py-typed` option which puts a `py.typed` marker in the installed package #8

Closed smheidrich closed 1 month ago

smheidrich commented 1 month ago

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 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).

You can see that it works here:

And see that the old behavior if add-py-typed is omitted still works as before (if a py.typed marker is present in the actual repo) here:

Fixes #5