Skip to content

Add CI report of typehint completeness #1807

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

cspotcode
Copy link
Collaborator

@cspotcode cspotcode commented May 31, 2023

Pyright has a flag to check how much of a library's API is properly typehinted. This PR generates that report on CI.

Output looks like this:
https://github.com/pythonarcade/arcade/actions/runs/5137377588/jobs/9245379193?pr=1807

It generates a summary at the bottom:

Symbols exported by "arcade": 9419
  With known type: 3363
  With ambiguous type: 442
  With unknown type: 5614
  Functions without docstring: 768
  Functions without default param: 38
  Classes without docstring: 150

Other symbols referenced but not exported by "arcade": 1151
  With known type: 877
  With ambiguous type: 54
  With unknown type: 220

Type completeness score: 35.7%

It would be great to see how much @gran4's PRs improve this score.

@cspotcode cspotcode marked this pull request as ready for review May 31, 2023 20:25
@pvcraven pvcraven merged commit ef8b5d8 into pythonarcade:development May 31, 2023
@cspotcode cspotcode deleted the pyright-check-type-coverage branch May 31, 2023 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants