Skip to content

Fix various small type hint issues#31920

Open
QuLogic wants to merge 7 commits into
matplotlib:mainfrom
QuLogic:type-hint-fixes
Open

Fix various small type hint issues#31920
QuLogic wants to merge 7 commits into
matplotlib:mainfrom
QuLogic:type-hint-fixes

Conversation

@QuLogic

@QuLogic QuLogic commented Jun 18, 2026

Copy link
Copy Markdown
Member

PR summary

These are mostly small things like missing parameters, but on a larger scale does correctly mark Bbox as being mutable, and fixes _ColorbarSpine to actually be a spine.

See the individual commits for details.

AI Disclosure

None

PR checklist

QuLogic added 7 commits June 18, 2026 03:54
The `_XYPair` is initialized with two lists, and is treated as such
(calling `.append`, etc.)
The `_ColorbarSpine` is a subclass of `mspines.Spine`, not
`mspines.Spines`.
This was missing a few parameters.
This is a mutable version of `BboxBase`, and all its properties should
be writable. Due to a deficiency in mypy [1], we need to ignore some
attribute access type errors.

python/mypy#5936
Axes should definitely be able to be placed in SubFigures, and that's
the accepted type for `_AxesBase.set_figure`.
This mostly means the paths are passed directly to `open` or similar.
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.

1 participant