Title: Should `_make_axis_parameter_optional` handle `None`? · Issue #31590 · matplotlib/matplotlib · GitHub
Open Graph Title: Should `_make_axis_parameter_optional` handle `None`? · Issue #31590 · matplotlib/matplotlib
X Title: Should `_make_axis_parameter_optional` handle `None`? · Issue #31590 · matplotlib/matplotlib
Description: I'm looking at the Seaborn issues from #31589, and one of them is that they are passing invalid types to Scale classes. That's easy enough to fix as they do have an axis variable available. However, I noticed that it is annotated as Axis...
Open Graph Description: I'm looking at the Seaborn issues from #31589, and one of them is that they are passing invalid types to Scale classes. That's easy enough to fix as they do have an axis variable available. However...
X Description: I'm looking at the Seaborn issues from #31589, and one of them is that they are passing invalid types to Scale classes. That's easy enough to fix as they do have an axis variable available....
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/31590
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Should `_make_axis_parameter_optional` handle `None`?","articleBody":"I'm looking at the Seaborn issues from #31589, and one of them is that they are passing invalid types to `Scale` classes. That's easy enough to fix as they do have an `axis` variable available. However, I noticed that it is annotated as `Axis | None`, and then looking at our classes, they are also annotated as `Axis | None`.\n\nBut looking at `_make_axis_parameter_optional`, it only pops the first argument if it is an `Axis` instance. Should it also be handling `None`? I'm not sure if this is possible with a generic decorator, or whether we need to use `_api.select_matching_signature` in each class `__init__`.","author":{"url":"https://github.com/QuLogic","@type":"Person","name":"QuLogic"},"datePublished":"2026-04-30T07:49:09.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/31590/matplotlib/issues/31590"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:a4a63762-e838-f1e0-8f9c-c950d1748138 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 943C:25C27F:1C15DC:24FAD2:6A5255E2 |
| html-safe-nonce | f7e05206639378a9e44692ac65274a23ed95bdc8e2a37d17077f7b624e924a71 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NDNDOjI1QzI3RjoxQzE1REM6MjRGQUQyOjZBNTI1NUUyIiwidmlzaXRvcl9pZCI6IjY4NzA0ODkzMTA2NDg0ODk0NDIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 1141f0a24b3bcc82dba87e9ea5142e8108f336c519c3f1e2fa969b6623dcc606 |
| hovercard-subject-tag | issue:4356315762 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/matplotlib/matplotlib/31590/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0b370773a69f318366a06d33fd3dd3b8a9f169c67118d0a2bce4b0e82551aaf2/matplotlib/matplotlib/issues/31590 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0b370773a69f318366a06d33fd3dd3b8a9f169c67118d0a2bce4b0e82551aaf2/matplotlib/matplotlib/issues/31590 |
| og:image:alt | I'm looking at the Seaborn issues from #31589, and one of them is that they are passing invalid types to Scale classes. That's easy enough to fix as they do have an axis variable available. However... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | QuLogic |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width