Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Exclude pylab from mypy checks #29267

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 1 commit into from
Dec 9, 2024
Merged

Conversation

rcomer
Copy link
Member

@rcomer rcomer commented Dec 9, 2024

PR summary

Aiming to close #29263.

PR checklist

@rcomer rcomer force-pushed the mypy-pylab branch 2 times, most recently from 62cc501 to 181a5ea Compare December 9, 2024 16:46
@rcomer
Copy link
Member Author

rcomer commented Dec 9, 2024

pylab is already in the stubtest allowlist

matplotlib\.pylab\..*

I thought this would be simple but apparently I am out of my depth.

@rcomer
Copy link
Member Author

rcomer commented Dec 9, 2024

The error is

error: not checking stubs due to mypy build errors

😕

@timhoffm
Copy link
Member

timhoffm commented Dec 9, 2024

At least the mypy linting action is happy. That's half way 😄.

Not an expert, but I would have tried to mess with this part as well:

matplotlib/pyproject.toml

Lines 224 to 225 in f0ecacc

#stubtest
".*/matplotlib/(sphinxext|backends|testing/jpl_units)",

@rcomer
Copy link
Member Author

rcomer commented Dec 9, 2024

Success 🎉

@@ -1,7 +1,7 @@
# Non-typed (and private) modules/functions
matplotlib\.backends\..*
matplotlib\.tests(\..*)?
matplotlib\.pylab\..*
matplotlib\.pylab(\..*)?
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without this change, stubtest both complains that it can't find a stub for pylab and that the allowlist entry is unused. Removing the entry only solved the second complaint. It seemed intuitive to make this line look like the sphinxext line.

@timhoffm timhoffm added this to the v3.10.0 milestone Dec 9, 2024
@tacaswell tacaswell merged commit 35d470a into matplotlib:main Dec 9, 2024
35 of 36 checks passed
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Dec 9, 2024
@rcomer rcomer deleted the mypy-pylab branch December 9, 2024 19:18
greglucas added a commit that referenced this pull request Dec 9, 2024
…267-on-v3.10.x

Backport PR #29267 on branch v3.10.x (Exclude pylab from mypy checks)
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.

[Bug]: mypy failures in CI
3 participants