Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 48ced0b

Browse files
committed
Deprecate unused AddList.
It's actually still used in get_vsize_hsize, but that is also currently deprecated. Also, there's a reasonable replacement. The replacement may be very slightly less efficient because it constructs deeply nested Add objects, but given the low level of maintenance for axes_grid1, decreasing the public API still seems a good idea.
1 parent cc71742 commit 48ced0b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
``mpl_toolkits.axes_grid1.axes_size.AddList``
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
... is deprecated due to being unused. Use ``sum(sizes, start=Fixed(0))`` (for
4+
example) to sum multiple size objects.

lib/mpl_toolkits/axes_grid1/axes_size.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ class (or others) to determine the size of each axes. The unit
1616

1717

1818
class _Base:
19-
2019
def __rmul__(self, other):
2120
return Fraction(other, self)
2221

@@ -38,6 +37,8 @@ def get_size(self, renderer):
3837
return a_rel_size + b_rel_size, a_abs_size + b_abs_size
3938

4039

40+
@_api.deprecated(
41+
"3.6", alternative="sum(sizes, start=Fixed(0))")
4142
class AddList(_Base):
4243
def __init__(self, add_list):
4344
self._list = add_list

0 commit comments

Comments
 (0)