Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfa21675

Browse files
authored
Merge pull request#16425 from tacaswell/mnt_rename_internals
MNT: rename internal variable
2 parentsb2e6e6d +9a7ddd3 commitfa21675

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

‎lib/matplotlib/mathtext.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2354,7 +2354,7 @@ def __init__(self):
23542354
p.simple=Forward()
23552355
p.simple_group=Forward()
23562356
p.single_symbol=Forward()
2357-
p.snowflake=Forward()
2357+
p.accentprefixed=Forward()
23582358
p.space=Forward()
23592359
p.sqrt=Forward()
23602360
p.stackrel=Forward()
@@ -2391,7 +2391,7 @@ def __init__(self):
23912391
p.single_symbol<<=Regex(
23922392
r"([a-zA-Z0-9 +\-*/<>=:,.;!\?&'@()\[\]|%s])|(\\[%%${}\[\]_|])"%
23932393
unicode_range)
2394-
p.snowflake<<=Suppress(p.bslash)+oneOf(self._snowflake)
2394+
p.accentprefixed<<=Suppress(p.bslash)+oneOf(self._accentprefixed)
23952395
p.symbol_name<<= (
23962396
Combine(p.bslash+oneOf(list(tex2uni)))
23972397
+FollowedBy(Regex("[^A-Za-z]").leaveWhitespace()|StringEnd())
@@ -2494,8 +2494,8 @@ def __init__(self):
24942494
)
24952495

24962496
p.placeable<<= (
2497-
p.snowflake# Must be before accent so named symbols that are
2498-
# prefixed with an accent name work
2497+
p.accentprefixed# Must be before accent so named symbols that are
2498+
# prefixed with an accent name work
24992499
|p.accent# Must be before symbol as all accents are symbols
25002500
|p.symbol# Must be third to catch all named symbols and single
25012501
# chars not in a group
@@ -2742,7 +2742,7 @@ def symbol(self, s, loc, toks):
27422742
do_kern=True)]
27432743
return [char]
27442744

2745-
snowflake=symbol
2745+
accentprefixed=symbol
27462746

27472747
defunknown_symbol(self,s,loc,toks):
27482748
c=toks[0]
@@ -2816,9 +2816,10 @@ def c_over_c(self, s, loc, toks):
28162816
_wide_accents=set(r"widehat widetilde widebar".split())
28172817

28182818
# make a lambda and call it to get the namespace right
2819-
_snowflake= (lambdaam: [pforpintex2uniif
2820-
any(p.startswith(a)anda!=pforainam)])(
2821-
set(_accent_map))
2819+
_accentprefixed= (lambdaam: [
2820+
pforpintex2uni
2821+
ifany(p.startswith(a)anda!=pforainam)
2822+
])(set(_accent_map))
28222823

28232824
defaccent(self,s,loc,toks):
28242825
assertlen(toks)==1

‎lib/matplotlib/tests/test_mathtext.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
r'${xyz}^k{x}_{k}{x}^{p}{y}^{p-2} {d}_{i}^{j}{b}_{j}{c}_{k}{d} {x}^{j}_{i}{E}^{0}{E}^0_u$',
102102
r'${\int}_x^x x\oint_x^x x\int_{X}^{X}x\int_x x \int^x x \int_{x} x\int^{x}{\int}_{x} x{\int}^{x}_{x}x$',
103103
r'testing$^{123}$',
104-
' '.join('$\\'+p+'$'forpinsorted(mathtext.Parser._snowflake)),
104+
' '.join('$\\'+p+'$'forpinsorted(mathtext.Parser._accentprefixed)),
105105
r'$6-2$; $-2$; $ -2$; ${-2}$; ${ -2}$; $20^{+3}_{-2}$',
106106
r'$\overline{\omega}^x \frac{1}{2}_0^x$',# github issue #5444
107107
r'$,$ $.$ $1{,}234{, }567{ , }890$ and $1,234,567,890$',# github issue 5799

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp