Commit 22b614b
committed
Fix invalid checks for axes_class parameter in ImageGrid.
The validation of the axes_class parameter in the Grid and ImageGrid
class have been wrong ever since they were merged in in f44235e
(relevant followup commits: 7482fdc, a5e67b9).
- In Grid, self._defaultAxesClass has never been a class with its own
.Axes attribute, so the subclass check would fail with an
AttributeError.
- In ImageGrid, the `isinstance(axes_class, Axes)` check should be
`issubclass(...)` instead. (The code later calls `axes_class(...)`
to build an axes instance so if one really passed an axes instance,
the call would raise an exception as axes are not callable.)
Fix these checks. As a consequence, there was no previously valid
path where axes_class_args would have been set, and passing a
`(class, args)` pair is not documented anyways, so drop that
"functionality" (which never worked).1 parent cfd52eb commit 22b614b
1 file changed
+2
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| |||
191 | 190 | | |
192 | 191 | | |
193 | 192 | | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | 193 | | |
203 | 194 | | |
204 | 195 | | |
| |||
246 | 237 | | |
247 | 238 | | |
248 | 239 | | |
249 | | - | |
250 | | - | |
| 240 | + | |
251 | 241 | | |
252 | 242 | | |
253 | 243 | | |
| |||
529 | 519 | | |
530 | 520 | | |
531 | 521 | | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | | - | |
536 | | - | |
537 | | - | |
538 | 522 | | |
539 | 523 | | |
540 | 524 | | |
| |||
581 | 565 | | |
582 | 566 | | |
583 | 567 | | |
584 | | - | |
585 | | - | |
| 568 | + | |
586 | 569 | | |
587 | 570 | | |
588 | 571 | | |
| |||
0 commit comments