8000 Exclude pylab from mypy checks by rcomer · Pull Request #29267 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ci/mypy-stubtest-allowlist.txt
Original file line number Diff line number Diff line change
@@ -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.

matplotlib\._.*
matplotlib\.rcsetup\._listify_validator
matplotlib\.rcsetup\._validate_linestyle
Expand Down
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ enable_incomplete_feature = [
]
exclude = [
#stubtest
".*/matplotlib/(sphinxext|backends|testing/jpl_units)",
".*/matplotlib/(sphinxext|backends|pylab|testing/jpl_units)",
#mypy precommit
"galleries/",
"doc/",
Expand All @@ -234,7 +234,9 @@ exclude = [
"lib/matplotlib/tests/",
# tinypages is used for testing the sphinx ext,
# stubtest will import and run, opening a figure if not excluded
".*/tinypages"
".*/tinypages",
# pylab's numpy wildcard imports cause re-def failures since numpy 2.2
"lib/matplotlib/pylab.py",
]
files = [
"lib/matplotlib",
Expand Down
Loading
0