8000 numdecs deprecation: tidy up · matplotlib/matplotlib@e1391cf · GitHub
[go: up one dir, main page]

Skip to content

Commit e1391cf

Browse files
committed
numdecs deprecation: tidy up
1 parent 7cb2418 commit e1391cf

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/matplotlib/tests/test_ticker.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
import matplotlib as mpl
1212
import matplotlib.pyplot as plt
1313
import matplotlib.ticker as mticker
14-
from matplotlib._api import MatplotlibDeprecationWarning
1514

1615

1716
class TestMaxNLocator:
@@ -234,10 +233,10 @@ def test_set_params(self):
234233
See if change was successful. Should not raise exception.
235234
"""
236235
loc = mticker.LogLocator()
237-
with pytest.warns(MatplotlibDeprecationWarning, match="numdecs"):
236+
with pytest.warns(mpl.MatplotlibDeprecationWarning, match="numdecs"):
238237
loc.set_params(numticks=7, numdecs=8, subs=[2.0], base=4)
239238
assert loc.numticks == 7
240-
with pytest.warns(MatplotlibDeprecationWarning, match="numdecs"):
239+
with pytest.warns(mpl.MatplotlibDeprecationWarning, match="numdecs"):
241240
assert loc.numdecs == 8
242241
assert loc._base == 4
243242
assert list(loc._subs) == [2.0]

lib/matplotlib/ticker.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2269,7 +2269,8 @@ def set_params(self, base=None, subs=None, numdecs=None, numticks=None):
22692269
if numticks is not None:
22702270
self.numticks = numticks
22712271

2272-
numdecs = _api.deprecate_privatize_attribute("3.8", addendum="This attribute has no effect.")
2272+
numdecs = _api.deprecate_privatize_attribute(
2273+
"3.8", addendum="This attribute has no effect.")
22732274

22742275
def _set_subs(self, subs):
22752276
"""

0 commit comments

Comments
 (0)
0