-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Post stubtest results to GitHub checks #25586
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
Conversation
The case that may need to be looked at a bit is the missing stub case, as that does not have a stub path to parse. Edit: on second thought, it may give the path of the parent object or just line 0 of the module, but still worth a look |
Would that be for a new Python file entirely? |
No, just for a new method is what I was thinking |
The |
I also just added an extra function in the stub, but not the Python file, and I see that that doesn't get posted either; it looks like there's a slightly difference in output in that case, which I should be able to cover. |
eff69d5
to
2d05200
Compare
OK, this is now able to post 1) differences between stubs and runtime; 2) items in stubs but not in runtime. Unfortunately, the case with items in runtime but not stubs cannot be caught, AFAICT. |
I opened an issue on stubtest to see if concise error messages could contain a bit more information (linked above). This could simplify this posting process as message would not be multiline. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's try this and see what happens.
PR Summary
Unfortunately, the way that
stubtest
outputs its error messages makes it difficult to post a message on both the.py
and.pyi
stub, so we decided to take the full message and post it only on one.As a test, I have made PR in my repo QuLogic#30 which started from the previously-unfixed #25542, and then I also added a commit with multiple argument mismatches to confirm that
stubtest
didn't output some different format.Results are at the bottom of https://github.com/QuLogic/matplotlib/pull/30/files
PR Checklist
Documentation and Tests
pytest
passes)Release Notes
.. versionadded::
directive in the docstring and documented indoc/users/next_whats_new/
.. versionchanged::
directive in the docstring and documented indoc/api/next_api_changes/
next_whats_new/README.rst
ornext_api_changes/README.rst