Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions lib/matplotlib/_fontconfig_pattern.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
from pyparsing import (
Group, Optional, ParseException, Regex, StringEnd, Suppress, ZeroOrMore)

from matplotlib import _api


_family_punc = r'\\\-:,'
_family_unescape = partial(re.compile(r'\\(?=[%s])' % _family_punc).sub, '')
Expand Down Expand Up @@ -97,12 +95,6 @@ def parse_fontconfig_pattern(pattern):
props["size"] = [*parse["sizes"]]
for prop in parse.get("properties", []):
if len(prop) == 1:
if prop[0] not in _CONSTANTS:
_api.warn_deprecated(
"3.7", message=f"Support for unknown constants "
f"({prop[0]!r}) is deprecated since %(since)s and "
f"will be removed %(removal)s.")
continue
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should now raise an error.

prop = _CONSTANTS[prop[0]]
k, *v = prop
props.setdefault(k, []).extend(map(_value_unescape, v))
Expand Down
7 changes: 3 additions & 4 deletions lib/matplotlib/gridspec.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import numpy as np

import matplotlib as mpl
from matplotlib import _api, _pylab_helpers, _tight_layout
from matplotlib import _pylab_helpers, _tight_layout
from matplotlib.transforms import Bbox

_log = logging.getLogger(__name__)
Expand Down Expand Up @@ -265,8 +265,7 @@ def subplots(self, *, sharex=False, sharey=False, squeeze=True,
if not isinstance(sharey, str):
sharey = "all" if sharey else "none"

_api.check_in_list(["all", "row", "col", "none", False, True],
sharex=sharex, sharey=sharey)

if subplot_kw is None:
subplot_kw = {}
# don't mutate kwargs passed by user...
Expand Down Expand Up @@ -568,7 +567,7 @@ def _from_subplot_args(figure, args):
elif len(args) == 3:
rows, cols, num = args
else:
raise _api.nargs_error("subplot", takes="1 or 3", given=len(args))
continue

gs = GridSpec._check_gridspec_exists(figure, rows, cols)
if gs is None:
Expand Down