Skip to content

Fix minor issues in stubtest wrapper - #28897

Merged
timhoffm merged 2 commits into
matplotlib:mainfrom
QuLogic:clearer-stubtest
Sep 29, 2024
Merged

timhoffm merged 2 commits into
matplotlib:mainfrom
QuLogic:clearer-stubtest

Conversation

@QuLogic

@QuLogic QuLogic commented Sep 27, 2024

Copy link
Copy Markdown
Member

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
Copy Markdown
Member

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

@QuLogic

QuLogic commented Sep 27, 2024

Copy link
Copy Markdown
Member Author

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
@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