8000 Backport PR #24989: Suppress pyparsing warning · meeseeksmachine/matplotlib@567dfa0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 567dfa0

Browse files
ksundenmeeseeksmachine
authored andcommitted
Backport PR matplotlib#24989: Suppress pyparsing warning
< 8000 svg aria-hidden="true" focusable="false" class="octicon octicon-git-branch Octicon-sc-9kayk9-0 mr-1" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom">
1 parent 9d1775e commit 567dfa0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/_fontconfig_pattern.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import re
1414

1515
from pyparsing import (
16-
Optional, ParseException, Regex, StringEnd, Suppress, ZeroOrMore)
16+
Group, Optional, ParseException, Regex, StringEnd, Suppress, ZeroOrMore)
1717

1818
from matplotlib import _api
1919

@@ -64,7 +64,7 @@ def comma_separated(elem):
6464
name = Regex(r"[a-z]+")
6565
value = Regex(r"([^%s]|(\\[%s]))*" % (_value_punc, _value_punc))
6666
# replace trailing `| name` by oneOf(_CONSTANTS) in mpl 3.9.
67-
prop = (name + Suppress("=") + comma_separated(value)) | name
67+
prop = Group((name + Suppress("=") + comma_separated(value)) | name)
6868
return (
6969
Optional(comma_separated(family)("families"))
7070
+ Optional("-" + comma_separated(size)("sizes"))

0 commit comments

Comments
 (0)
0