python-rope / rope

a python refactoring library
GNU Lesser General Public License v3.0
1.96k stars 164 forks source link

Add ratcheting type completeness check to CI #799

Open smheidrich opened 1 month ago

smheidrich commented 1 month ago

Description

To help make progress in adding type hints for Rope's public API (#798), it might make sense to have a "ratcheting" mechanism in CI that prevents merging PRs which make the typing situation worse (by adding more untyped public functionality) and might motivate people to actively improve it by adding more type hints (although unfortunately the completeness score isn't visible directly on the PR page, which would probably help facilitate that).

This PR adds such a mechanism using the pyright-type-completeness GitHub Action.

You can see what it looks like in action here: https://github.com/smheidrich/rope/pull/1