Skip to content

Commit

Permalink
MNT: Fix E122 continuation line missing indentation
Browse files Browse the repository at this point in the history
There are really not very many of these to justify exempting the entire
file, and they are easily fixed.
  • Loading branch information
QuLogic committed Dec 20, 2023
1 parent 8182ee6 commit e42c305
Show file tree
Hide file tree
Showing 3 changed files with 133 additions and 142 deletions.
4 changes: 2 additions & 2 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ exclude =
.eggs

per-file-ignores =
lib/matplotlib/_cm.py: E122, E202, E203, E302
lib/matplotlib/_cm.py: E202, E203, E302
lib/matplotlib/_mathtext.py: E221, E251
lib/matplotlib/_mathtext_data.py: E122, E203, E261
lib/matplotlib/_mathtext_data.py: E203, E261
lib/matplotlib/backends/backend_template.py: F401
lib/matplotlib/mathtext.py: E221
lib/matplotlib/pylab.py: F401, F403
Expand Down
202 changes: 104 additions & 98 deletions lib/matplotlib/_cm.py
Original file line number Diff line number Diff line change
Expand Up @@ -965,52 +965,55 @@ def _g36(x): return 2 * x - 1
# gist_earth_data and gist_ncar_data were simplified by a script and some
# manual effort.

_gist_earth_data = \
{'red': (
(0.0, 0.0, 0.0000),
(0.2824, 0.1882, 0.1882),
(0.4588, 0.2714, 0.2714),
(0.5490, 0.4719, 0.4719),
(0.6980, 0.7176, 0.7176),
(0.7882, 0.7553, 0.7553),
(1.0000, 0.9922, 0.9922),
), 'green': (
(0.0, 0.0, 0.0000),
(0.0275, 0.0000, 0.0000),
(0.1098, 0.1893, 0.1893),
(0.1647, 0.3035, 0.3035),
(0.2078, 0.3841, 0.3841),
(0.2824, 0.5020, 0.5020),
(0.5216, 0.6397, 0.6397),
(0.6980, 0.7171, 0.7171),
(0.7882, 0.6392, 0.6392),
(0.7922, 0.6413, 0.6413),
(0.8000, 0.6447, 0.6447),
(0.8078, 0.6481, 0.6481),
(0.8157, 0.6549, 0.6549),
(0.8667, 0.6991, 0.6991),
(0.8745, 0.7103, 0.7103),
(0.8824, 0.7216, 0.7216),
(0.8902, 0.7323, 0.7323),
(0.8980, 0.7430, 0.7430),
(0.9412, 0.8275, 0.8275),
(0.9569, 0.8635, 0.8635),
(0.9647, 0.8816, 0.8816),
(0.9961, 0.9733, 0.9733),
(1.0000, 0.9843, 0.9843),
), 'blue': (
(0.0, 0.0, 0.0000),
(0.0039, 0.1684, 0.1684),
(0.0078, 0.2212, 0.2212),
(0.0275, 0.4329, 0.4329),
(0.0314, 0.4549, 0.4549),
(0.2824, 0.5004, 0.5004),
(0.4667, 0.2748, 0.2748),
(0.5451, 0.3205, 0.3205),
(0.7843, 0.3961, 0.3961),
(0.8941, 0.6651, 0.6651),
(1.0000, 0.9843, 0.9843),
)}
_gist_earth_data = {
'red': (
(0.0, 0.0, 0.0000),
(0.2824, 0.1882, 0.1882),
(0.4588, 0.2714, 0.2714),
(0.5490, 0.4719, 0.4719),
(0.6980, 0.7176, 0.7176),
(0.7882, 0.7553, 0.7553),
(1.0000, 0.9922, 0.9922),
),
'green': (
(0.0, 0.0, 0.0000),
(0.0275, 0.0000, 0.0000),
(0.1098, 0.1893, 0.1893),
(0.1647, 0.3035, 0.3035),
(0.2078, 0.3841, 0.3841),
(0.2824, 0.5020, 0.5020),
(0.5216, 0.6397, 0.6397),
(0.6980, 0.7171, 0.7171),
(0.7882, 0.6392, 0.6392),
(0.7922, 0.6413, 0.6413),
(0.8000, 0.6447, 0.6447),
(0.8078, 0.6481, 0.6481),
(0.8157, 0.6549, 0.6549),
(0.8667, 0.6991, 0.6991),
(0.8745, 0.7103, 0.7103),
(0.8824, 0.7216, 0.7216),
(0.8902, 0.7323, 0.7323),
(0.8980, 0.7430, 0.7430),
(0.9412, 0.8275, 0.8275),
(0.9569, 0.8635, 0.8635),
(0.9647, 0.8816, 0.8816),
(0.9961, 0.9733, 0.9733),
(1.0000, 0.9843, 0.9843),
),
'blue': (
(0.0, 0.0, 0.0000),
(0.0039, 0.1684, 0.1684),
(0.0078, 0.2212, 0.2212),
(0.0275, 0.4329, 0.4329),
(0.0314, 0.4549, 0.4549),
(0.2824, 0.5004, 0.5004),
(0.4667, 0.2748, 0.2748),
(0.5451, 0.3205, 0.3205),
(0.7843, 0.3961, 0.3961),
(0.8941, 0.6651, 0.6651),
(1.0000, 0.9843, 0.9843),
)
}

_gist_gray_data = {
'red': gfunc[3],
Expand All @@ -1024,58 +1027,61 @@ def _gist_heat_blue(x): return 4 * x - 3
_gist_heat_data = {
'red': _gist_heat_red, 'green': _gist_heat_green, 'blue': _gist_heat_blue}

_gist_ncar_data = \
{'red': (
(0.0, 0.0, 0.0000),
(0.3098, 0.0000, 0.0000),
(0.3725, 0.3993, 0.3993),
(0.4235, 0.5003, 0.5003),
(0.5333, 1.0000, 1.0000),
(0.7922, 1.0000, 1.0000),
(0.8471, 0.6218, 0.6218),
(0.8980, 0.9235, 0.9235),
(1.0000, 0.9961, 0.9961),
), 'green': (
(0.0, 0.0, 0.0000),
(0.0510, 0.3722, 0.3722),
(0.1059, 0.0000, 0.0000),
(0.1569, 0.7202, 0.7202),
(0.1608, 0.7537, 0.7537),
(0.1647, 0.7752, 0.7752),
(0.2157, 1.0000, 1.0000),
(0.2588, 0.9804, 0.9804),
(0.2706, 0.9804, 0.9804),
(0.3176, 1.0000, 1.0000),
(0.3686, 0.8081, 0.8081),
(0.4275, 1.0000, 1.0000),
(0.5216, 1.0000, 1.0000),
(0.6314, 0.7292, 0.7292),
(0.6863, 0.2796, 0.2796),
(0.7451, 0.0000, 0.0000),
(0.7922, 0.0000, 0.0000),
(0.8431, 0.1753, 0.1753),
(0.8980, 0.5000, 0.5000),
(1.0000, 0.9725, 0.9725),
), 'blue': (
(0.0, 0.5020, 0.5020),
(0.0510, 0.0222, 0.0222),
(0.1098, 1.0000, 1.0000),
(0.2039, 1.0000, 1.0000),
(0.2627, 0.6145, 0.6145),
(0.3216, 0.0000, 0.0000),
(0.4157, 0.0000, 0.0000),
(0.4745, 0.2342, 0.2342),
(0.5333, 0.0000, 0.0000),
(0.5804, 0.0000, 0.0000),
(0.6314, 0.0549, 0.0549),
(0.6902, 0.0000, 0.0000),
(0.7373, 0.0000, 0.0000),
(0.7922, 0.9738, 0.9738),
(0.8000, 1.0000, 1.0000),
(0.8431, 1.0000, 1.0000),
(0.8980, 0.9341, 0.9341),
(1.0000, 0.9961, 0.9961),
)}
_gist_ncar_data = {
'red': (
(0.0, 0.0, 0.0000),
(0.3098, 0.0000, 0.0000),
(0.3725, 0.3993, 0.3993),
(0.4235, 0.5003, 0.5003),
(0.5333, 1.0000, 1.0000),
(0.7922, 1.0000, 1.0000),
(0.8471, 0.6218, 0.6218),
(0.8980, 0.9235, 0.9235),
(1.0000, 0.9961, 0.9961),
),
'green': (
(0.0, 0.0, 0.0000),
(0.0510, 0.3722, 0.3722),
(0.1059, 0.0000, 0.0000),
(0.1569, 0.7202, 0.7202),
(0.1608, 0.7537, 0.7537),
(0.1647, 0.7752, 0.7752),
(0.2157, 1.0000, 1.0000),
(0.2588, 0.9804, 0.9804),
(0.2706, 0.9804, 0.9804),
(0.3176, 1.0000, 1.0000),
(0.3686, 0.8081, 0.8081),
(0.4275, 1.0000, 1.0000),
(0.5216, 1.0000, 1.0000),
(0.6314, 0.7292, 0.7292),
(0.6863, 0.2796, 0.2796),
(0.7451, 0.0000, 0.0000),
(0.7922, 0.0000, 0.0000),
(0.8431, 0.1753, 0.1753),
(0.8980, 0.5000, 0.5000),
(1.0000, 0.9725, 0.9725),
),
'blue': (
(0.0, 0.5020, 0.5020),
(0.0510, 0.0222, 0.0222),
(0.1098, 1.0000, 1.0000),
(0.2039, 1.0000, 1.0000),
(0.2627, 0.6145, 0.6145),
(0.3216, 0.0000, 0.0000),
(0.4157, 0.0000, 0.0000),
(0.4745, 0.2342, 0.2342),
(0.5333, 0.0000, 0.0000),
(0.5804, 0.0000, 0.0000),
(0.6314, 0.0549, 0.0549),
(0.6902, 0.0000, 0.0000),
(0.7373, 0.0000, 0.0000),
(0.7922, 0.9738, 0.9738),
(0.8000, 1.0000, 1.0000),
(0.8431, 1.0000, 1.0000),
(0.8980, 0.9341, 0.9341),
(1.0000, 0.9961, 0.9961),
)
}

_gist_rainbow_data = (
(0.000, (1.00, 0.00, 0.16)),
Expand Down
69 changes: 27 additions & 42 deletions lib/matplotlib/_mathtext_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -1118,10 +1118,8 @@

_stix_virtual_fonts: dict[str, Union[dict[
str, list[_EntryTypeIn]], list[_EntryTypeIn]]] = {
'bb':
{
"rm":
[
'bb': {
"rm": [
("\N{DIGIT ZERO}",
"\N{DIGIT NINE}",
"rm",
Expand Down Expand Up @@ -1194,9 +1192,8 @@
"\N{GREEK SMALL LETTER PI}",
"rm",
"\N{DOUBLE-STRUCK SMALL PI}"),
],
"it":
[
],
"it": [
("\N{DIGIT ZERO}",
"\N{DIGIT NINE}",
"rm",
Expand Down Expand Up @@ -1289,9 +1286,8 @@
"\N{GREEK SMALL LETTER PI}",
"it",
"\N{DOUBLE-STRUCK SMALL PI}"),
],
"bf":
[
],
"bf": [
("\N{DIGIT ZERO}",
"\N{DIGIT NINE}",
"rm",
Expand Down Expand Up @@ -1386,17 +1382,14 @@
"\N{DOUBLE-STRUCK SMALL PI}"),
],
},
'cal':
[
'cal': [
("\N{LATIN CAPITAL LETTER A}",
"\N{LATIN CAPITAL LETTER Z}",
"it",
0xe22d),
],
'frak':
{
"rm":
[
],
'frak': {
"rm": [
("\N{LATIN CAPITAL LETTER A}",
"\N{LATIN CAPITAL LETTER B}",
"rm",
Expand Down Expand Up @@ -1438,8 +1431,7 @@
"rm",
"\N{MATHEMATICAL FRAKTUR SMALL A}"),
],
"bf":
[
"bf": [
("\N{LATIN CAPITAL LETTER A}",
"\N{LATIN CAPITAL LETTER Z}",
"bf",
Expand All @@ -1448,10 +1440,9 @@
"\N{LATIN SMALL LETTER Z}",
"bf",
"\N{MATHEMATICAL BOLD FRAKTUR SMALL A}"),
],
},
'scr':
[
],
},
'scr': [
("\N{LATIN CAPITAL LETTER A}",
"\N{LATIN CAPITAL LETTER A}",
"it",
Expand Down Expand Up @@ -1533,10 +1524,8 @@
"it",
"\N{MATHEMATICAL SCRIPT SMALL P}"),
],
'sf':
{
"rm":
[
'sf': {
"rm": [
("\N{DIGIT ZERO}",
"\N{DIGIT NINE}",
"rm",
Expand Down Expand Up @@ -1581,9 +1570,8 @@
"\N{PARTIAL DIFFERENTIAL}",
"rm",
0xe17c),
],
"it":
[
],
"it": [
# These numerals are actually upright. We don't actually
# want italic numerals ever.
("\N{DIGIT ZERO}",
Expand Down Expand Up @@ -1626,9 +1614,8 @@
"\N{GREEK LUNATE EPSILON SYMBOL}",
"it",
0xe1f1),
],
"bf":
[
],
"bf": [
("\N{DIGIT ZERO}",
"\N{DIGIT NINE}",
"bf",
Expand Down Expand Up @@ -1681,9 +1668,8 @@
"\N{NABLA}",
"bf",
"\N{MATHEMATICAL SANS-SERIF BOLD NABLA}"),
],
"bfit":
[
],
"bfit": [
("\N{LATIN CAPITAL LETTER A}",
"\N{LATIN CAPITAL LETTER Z}",
"bfit",
Expand All @@ -1700,10 +1686,9 @@
"\N{GREEK SMALL LETTER OMEGA}",
"bfit",
"\N{MATHEMATICAL BOLD ITALIC SMALL ALPHA}"),
],
},
'tt':
[
],
},
'tt': [
("\N{DIGIT ZERO}",
"\N{DIGIT NINE}",
"rm",
Expand All @@ -1716,8 +1701,8 @@
"\N{LATIN SMALL LETTER Z}",
"rm",
"\N{MATHEMATICAL MONOSPACE SMALL A}")
],
}
],
}


@overload
Expand Down

0 comments on commit e42c305

Please sign in to comment.