Skip to content

Fix minor issues in stubtest wrapper #28897

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
merged 2 commits into from
Sep 29, 2024
Merged

Conversation

QuLogic
Copy link
Member

@QuLogic QuLogic commented Sep 27, 2024

PR summary

The stubtest allow list is technically composed of regex patterns, so ensure that entries are correctly escaped. Also, don't add an exception if it's already covered by our generic ones. This fixes the problem seen in #28874.

PR checklist

The list is full of regexs, not globs, so correctly escape the periods
to be more specific.

Note that to catch `module.__init__`, you need to specific `module`, so
there is some slight modification for `matplotlib.tests` /
`matplotlib.sphinxext`.
This fixes the "unused allowlist entry" error we see in matplotlib#28874.
@timhoffm
Copy link
Member

The existing allowlist looks like it was written with fnmatch logic in mind. Would that be simpler/sufficient rather than using regexes?

@QuLogic
Copy link
Member Author

QuLogic commented Sep 27, 2024

The allow list is defined by stubtest, and always was a regex. The old one worked since regex . matches literal . too, but places with .* were not exactly the same.

@timhoffm timhoffm merged commit 6404c95 into matplotlib:main Sep 29, 2024
39 of 43 checks passed
@timhoffm timhoffm added this to the v3.10.0 milestone Sep 29, 2024
@QuLogic QuLogic deleted the clearer-stubtest branch September 30, 2024 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants