8000 Merge pull request #28670 from tacaswell/api/deprecate_unused_register · matplotlib/matplotlib@a00a714 · GitHub
[go: up one dir, main page]

Skip to content

Commit a00a714

Browse files
authored
Merge pull request #28670 from tacaswell/api/deprecate_unused_register
API: deprecate unused helper in patch._Styles
2 parents d239b36 + cde1fa5 commit a00a714

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Deprecated ``register`` on ``matplotlib.patches._Styles`` and subclasses
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
This class method is never used internally. Due to the internal check in the
5+
method it only accepts subclasses of a private baseclass embedded in the host
6+
class which makes it unlikely that it has been used externally.

lib/matplotlib/patches.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2347,6 +2347,11 @@ def pprint_styles(cls):
23472347
return textwrap.indent(rst_table, prefix=' ' * 4)
23482348

23492349
@classmethod
2350+
@_api.deprecated(
2351+
'3.10.0',
2352+
message="This method is never used internally.",
2353+
alternative="No replacement. Please open an issue if you use this."
2354+
)
23502355
def register(cls, name, style):
23512356
"""Register a new style."""
23522357
if not issubclass(style, cls._Base):

0 commit comments

Comments
 (0)
0