You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just created a new mpl-dev environment from the conda yml file. I think this was the first time I had python 3.13 for this. The black version installed was 19.3b0, which is pretty old and caused a failure in boilerplate.py (due to psf/black#2964).
I think the problem is that we currently have black pinned to <24 to keep the formatting stable. However black versions 20-23 are only available for python<3.13.
Edit: so running boilerplate.py or pytest lib/matplotlib/tests/test_pyplot.py::test_pyplot_up_to_date with the wrong black version will cause a failure.
When we added type annotations we decided to put them inline in the auto-generated code rather than write a second auto-generator for a pyplot.pyi. Once we had done that we decided to use an auto-formatter on the generated code rather than writing our own formatter to get the line wrapping correct on the now much longer signatures.
Activity
jklymak commentedon Sep 27, 2025
In what context do we even use black?
rcomer commentedon Sep 27, 2025
We use it to format
pyplot.pyEdit: so running
boilerplate.pyorpytest lib/matplotlib/tests/test_pyplot.py::test_pyplot_up_to_datewith the wrong black version will cause a failure.rcomer commentedon Sep 27, 2025
Possibly we should consider using the ruff formatter instead of black, now that we use ruff elsewhere. However, #30612 is the quick fix.
tacaswell commentedon Sep 29, 2025
When we added type annotations we decided to put them inline in the auto-generated code rather than write a second auto-generator for a pyplot.pyi. Once we had done that we decided to use an auto-formatter on the generated code rather than writing our own formatter to get the line wrapping correct on the now much longer signatures.