Skip to content

Commit 0103d95

Browse files
committed
Make get_scale_docs() internal
1 parent bcb372b commit 0103d95

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Deprecations
2+
````````````
3+
4+
The function ``matplotlib.scale.get_scale_docs()`` and its alias
5+
``matplotlib.pyplot.get_scale_docs()`` are considered internal and will be
6+
removed from the public API in a future version.

lib/matplotlib/scale.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,16 @@ def register_scale(scale_class):
579579
_scale_mapping[scale_class.name] = scale_class
580580

581581

582+
@cbook.deprecated('3.1', 'get_scale_docs() is considered private API since '
583+
'3.1 and will be removed from the public API in 3.3.')
582584
def get_scale_docs():
585+
"""
586+
Helper function for generating docstrings related to scales.
587+
"""
588+
return _get_scale_docs()
589+
590+
591+
def _get_scale_docs():
583592
"""
584593
Helper function for generating docstrings related to scales.
585594
"""
@@ -598,5 +607,5 @@ def get_scale_docs():
598607

599608
docstring.interpd.update(
600609
scale=' | '.join([repr(x) for x in get_scale_names()]),
601-
scale_docs=get_scale_docs().rstrip(),
610+
scale_docs=_get_scale_docs().rstrip(),
602611
)

0 commit comments

Comments
 (0)