Skip to content

Commit 6cf652c

Browse files
oscargusQuLogic
andauthored
Apply suggestions from code review
Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
1 parent 81c392f commit 6cf652c

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
Passing undefined ``label_mode`` to ``Grid``
2-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1+
Passing undefined *label_mode* to ``Grid``
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33

44
... is deprecated. This includes `mpl_toolkits.axes_grid1.axes_grid.Grid`,
55
`mpl_toolkits.axes_grid1.axes_grid.AxesGrid`, and
66
`mpl_toolkits.axes_grid1.axes_grid.ImageGrid` as well as the corresponding
77
classes imported from `mpl_toolkits.axisartist.axes_grid`.
88

9-
Pass ``'keep'`` instead to get the same behavior.
9+
Pass ``label_mode='keep'`` instead to get the previous behavior of not modifying labels.

lib/mpl_toolkits/axes_grid1/axes_grid.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ def set_label_mode(self, mode):
300300
if mode != 'keep':
301301
_api.warn_deprecated(
302302
'3.7', name="Grid label_mode",
303-
message='Passing a non-defined label_mode is deprecated '
303+
message='Passing an undefined label_mode is deprecated '
304304
'since %(since)s and will become an error '
305305
'%(removal)s. To silence this warning, pass '
306306
'"keep", which gives the same behaviour.')

lib/mpl_toolkits/axes_grid1/tests/test_axes_grid1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ def test_image_grid_label_mode_deprecation_warning():
408408

409409
fig = plt.figure()
410410
with pytest.warns(_api.MatplotlibDeprecationWarning,
411-
match="Passing a non-defined label_mode"):
411+
match="Passing an undefined label_mode"):
412412
grid = ImageGrid(fig, (0, 0, 1, 1), (2, 1), label_mode="foo")
413413

414414

0 commit comments

Comments
 (0)