Skip to content
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

stubtest: fix false negative with dunder methods, small changes #8886

Merged
merged 4 commits into from
May 26, 2020

Conversation

hauntsaninja
Copy link
Collaborator

If a stub was completely missing a dunder method, we wouldn't check it against the runtime. It's noisy to check all dunder methods, but checking init, new and call catches a lot of false negatives on typeshed without much noise.

@JelleZijlstra
Copy link
Member

The Appveyor CI failure isn't real. Looks like we may have disabled the Appveyor project but we still try to trigger it.

Out of curiosity, what are the noisy results from enabling this for other dunders?

@hauntsaninja
Copy link
Collaborator Author

I wasn't too thorough, but there were a number of complaints about __hash__ and __doc__. Using @functools.total_ordering causes complaints about the various comparators. One or two other things. Maybe a blacklist would be better than a whitelist.

hauntsaninja added 4 commits May 26, 2020 11:36
Seems to be a little more reliable
I can no longer repro any of the behaviour related to distutils.command.
I found one case it can come up involving builtins, but overall I think
this code is just simpler like this.
If the stub doesn't list dunder methods, we wouldn't check them earlier.
There are a lot of false negatives due to this.
Also covers some of the MRO logic in verify_typeinfo
@hauntsaninja
Copy link
Collaborator Author

#8786 just got merged, so let's try CI again

@hauntsaninja
Copy link
Collaborator Author

cc @JelleZijlstra not sure how to request review, but everything is green now

@JelleZijlstra JelleZijlstra merged commit b3d4398 into python:master May 26, 2020
@hauntsaninja hauntsaninja deleted the stubtestfixes branch May 26, 2020 20:49
hauntsaninja pushed a commit to hauntsaninja/typeshed that referenced this pull request May 26, 2020
hauntsaninja pushed a commit to hauntsaninja/typeshed that referenced this pull request May 26, 2020
srittau pushed a commit to python/typeshed that referenced this pull request May 27, 2020
vishalkuo pushed a commit to vishalkuo/typeshed that referenced this pull request Jun 26, 2020
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