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

Skip to content

Commit 9fe5f5b

Browse files
authored
Merge pull request #15895 from anntzer/depr-unused-attr
Deprecate unused illegal_s attribute.
2 parents 508f21f + 0ed373e commit 9fe5f5b

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

doc/api/next_api_changes/deprecations.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,7 @@ Passing raw data via parameters *data* and *lut* to `.register_cmap()` is
5959
deprecated. Instead, explicitly create a `.LinearSegmentedColormap` and pass
6060
it via the *cmap* parameter:
6161
``register_cmap(cmap=LinearSegmentedColormap(name, data, lut))``.
62+
63+
``DateFormatter.illegal_s``
64+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
65+
This attribute is unused and deprecated.

lib/matplotlib/dates.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,10 @@ class DateFormatter(ticker.Formatter):
572572
`~datetime.datetime.strftime` format string.
573573
"""
574574

575-
illegal_s = re.compile(r"((^|[^%])(%%)*%s)")
575+
@cbook.deprecated("3.3")
576+
@property
577+
def illegal_s(self):
578+
return re.compile(r"((^|[^%])(%%)*%s)")
576579

577580
def __init__(self, fmt, tz=None):
578581
"""

0 commit comments

Comments
 (0)