Commit 4b997de
committed
Fix make_norm_from_scale
`make_norm_from_scale` can be used "inline", rather than as a class
decorator, to dynamically create norm classes. However, in that case,
the second parameter (`base_norm_cls`) would normally be set to the root
base norm class (`mcolors.Normalize`). In that case, we should
generate a new `__name__` for the dynamically generated class, to avoid
the slightly confusing situation of having two different classes both
called `mcolors.Normalize`.__name__ when used inline.1 parent e272daa commit 4b997de
2 files changed
+8
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1561 | 1561 | | |
1562 | 1562 | | |
1563 | 1563 | | |
1564 | | - | |
| 1564 | + | |
| 1565 | + | |
1565 | 1566 | | |
1566 | 1567 | | |
1567 | 1568 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1475 | 1475 | | |
1476 | 1476 | | |
1477 | 1477 | | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
0 commit comments