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

Appearance settings

Commit 30ddba9

Browse filesBrowse files
authored
Merge pull request #27546 from QuLogic/explicit-style-exceptions
MNT: Clean up some style exceptions
2 parents 65d6560 + 01e0541 commit 30ddba9
Copy full SHA for 30ddba9

File tree

Expand file treeCollapse file tree

12 files changed

+168
-185
lines changed
Filter options
Expand file treeCollapse file tree

12 files changed

+168
-185
lines changed

‎.flake8

Copy file name to clipboardExpand all lines: .flake8
+3-11Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,26 +31,18 @@ exclude =
3131
.eggs
3232

3333
per-file-ignores =
34-
lib/matplotlib/__init__.py: E402, F401
35-
lib/matplotlib/_animation_data.py: E501
36-
lib/matplotlib/_api/__init__.py: F401
37-
lib/matplotlib/_cm.py: E122, E202, E203, E302
34+
lib/matplotlib/_cm.py: E202, E203, E302
3835
lib/matplotlib/_mathtext.py: E221, E251
39-
lib/matplotlib/_mathtext_data.py: E122, E203, E261
40-
lib/matplotlib/axes/__init__.py: F401, F403
36+
lib/matplotlib/_mathtext_data.py: E203, E261
4137
lib/matplotlib/backends/backend_template.py: F401
42-
lib/matplotlib/font_manager.py: E501
43-
lib/matplotlib/image.py: F401, F403
4438
lib/matplotlib/mathtext.py: E221
4539
lib/matplotlib/pylab.py: F401, F403
46-
lib/matplotlib/pyplot.py: F401, F811
40+
lib/matplotlib/pyplot.py: F811
4741
lib/matplotlib/tests/test_mathtext.py: E501
4842
lib/matplotlib/transforms.py: E201, E202, E203
4943
lib/matplotlib/tri/_triinterpolate.py: E201, E221
5044
lib/mpl_toolkits/axes_grid1/axes_size.py: E272
51-
lib/mpl_toolkits/axisartist/__init__.py: F401
5245
lib/mpl_toolkits/axisartist/angle_helper.py: E221
53-
lib/pylab.py: F401, F403
5446

5547
doc/conf.py: E402
5648
galleries/users_explain/artists/paths.py: E402

‎lib/matplotlib/__init__.py

Copy file name to clipboardExpand all lines: lib/matplotlib/__init__.py
+5-6Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -151,17 +151,16 @@
151151
import subprocess
152152
import sys
153153
import tempfile
154-
import warnings
155154

156-
import numpy
157155
from packaging.version import parse as parse_version
158156

159157
# cbook must import matplotlib only within function
160158
# definitions, so it is safe to import from it here.
161159
from . import _api, _version, cbook, _docstring, rcsetup
162160
from matplotlib.cbook import sanitize_sequence
163161
from matplotlib._api import MatplotlibDeprecationWarning
164-
from matplotlib.rcsetup import validate_backend, cycler
162+
from matplotlib.rcsetup import cycler # noqa: F401
163+
from matplotlib.rcsetup import validate_backend
165164

166165

167166
_log = logging.getLogger(__name__)
@@ -246,7 +245,7 @@ def _check_versions():
246245

247246
# Quickfix to ensure Microsoft Visual C++ redistributable
248247
# DLLs are loaded before importing kiwisolver
249-
from . import ft2font
248+
from . import ft2font # noqa: F401
250249

251250
for modname, minver in [
252251
("cycler", "0.10"),
@@ -1511,5 +1510,5 @@ def inner(ax, *args, data=None, **kwargs):
15111510

15121511
# workaround: we must defer colormaps import to after loading rcParams, because
15131512
# colormap creation depends on rcParams
1514-
from matplotlib.cm import _colormaps as colormaps
1515-
from matplotlib.colors import _color_sequences as color_sequences
1513+
from matplotlib.cm import _colormaps as colormaps # noqa: E402
1514+
from matplotlib.colors import _color_sequences as color_sequences # noqa: E402

‎lib/matplotlib/_animation_data.py

Copy file name to clipboardExpand all lines: lib/matplotlib/_animation_data.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@
251251
}}, 0);
252252
}})()
253253
</script>
254-
"""
254+
""" # noqa: E501
255255

256256

257257
INCLUDED_FRAMES = """

‎lib/matplotlib/_api/__init__.py

Copy file name to clipboardExpand all lines: lib/matplotlib/_api/__init__.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import sys
1717
import warnings
1818

19-
from .deprecation import (
19+
from .deprecation import ( # noqa: F401
2020
deprecated, warn_deprecated,
2121
rename_parameter, delete_parameter, make_keyword_only,
2222
deprecate_method_override, deprecate_privatize_attribute,

‎lib/matplotlib/_cm.py

Copy file name to clipboardExpand all lines: lib/matplotlib/_cm.py
+104-98Lines changed: 104 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -965,52 +965,55 @@ def _g36(x): return 2 * x - 1
965965
# gist_earth_data and gist_ncar_data were simplified by a script and some
966966
# manual effort.
967967

968-
_gist_earth_data = \
969-
{'red': (
970-
(0.0, 0.0, 0.0000),
971-
(0.2824, 0.1882, 0.1882),
972-
(0.4588, 0.2714, 0.2714),
973-
(0.5490, 0.4719, 0.4719),
974-
(0.6980, 0.7176, 0.7176),
975-
(0.7882, 0.7553, 0.7553),
976-
(1.0000, 0.9922, 0.9922),
977-
), 'green': (
978-
(0.0, 0.0, 0.0000),
979-
(0.0275, 0.0000, 0.0000),
980-
(0.1098, 0.1893, 0.1893),
981-
(0.1647, 0.3035, 0.3035),
982-
(0.2078, 0.3841, 0.3841),
983-
(0.2824, 0.5020, 0.5020),
984-
(0.5216, 0.6397, 0.6397),
985-
(0.6980, 0.7171, 0.7171),
986-
(0.7882, 0.6392, 0.6392),
987-
(0.7922, 0.6413, 0.6413),
988-
(0.8000, 0.6447, 0.6447),
989-
(0.8078, 0.6481, 0.6481),
990-
(0.8157, 0.6549, 0.6549),
991-
(0.8667, 0.6991, 0.6991),
992-
(0.8745, 0.7103, 0.7103),
993-
(0.8824, 0.7216, 0.7216),
994-
(0.8902, 0.7323, 0.7323),
995-
(0.8980, 0.7430, 0.7430),
996-
(0.9412, 0.8275, 0.8275),
997-
(0.9569, 0.8635, 0.8635),
998-
(0.9647, 0.8816, 0.8816),
999-
(0.9961, 0.9733, 0.9733),
1000-
(1.0000, 0.9843, 0.9843),
1001-
), 'blue': (
1002-
(0.0, 0.0, 0.0000),
1003-
(0.0039, 0.1684, 0.1684),
1004-
(0.0078, 0.2212, 0.2212),
1005-
(0.0275, 0.4329, 0.4329),
1006-
(0.0314, 0.4549, 0.4549),
1007-
(0.2824, 0.5004, 0.5004),
1008-
(0.4667, 0.2748, 0.2748),
1009-
(0.5451, 0.3205, 0.3205),
1010-
(0.7843, 0.3961, 0.3961),
1011-
(0.8941, 0.6651, 0.6651),
1012-
(1.0000, 0.9843, 0.9843),
1013-
)}
968+
_gist_earth_data = {
969+
'red': (
970+
(0.0, 0.0, 0.0000),
971+
(0.2824, 0.1882, 0.1882),
972+
(0.4588, 0.2714, 0.2714),
973+
(0.5490, 0.4719, 0.4719),
974+
(0.6980, 0.7176, 0.7176),
975+
(0.7882, 0.7553, 0.7553),
976+
(1.0000, 0.9922, 0.9922),
977+
),
978+
'green': (
979+
(0.0, 0.0, 0.0000),
980+
(0.0275, 0.0000, 0.0000),
981+
(0.1098, 0.1893, 0.1893),
982+
(0.1647, 0.3035, 0.3035),
983+
(0.2078, 0.3841, 0.3841),
984+
(0.2824, 0.5020, 0.5020),
985+
(0.5216, 0.6397, 0.6397),
986+
(0.6980, 0.7171, 0.7171),
987+
(0.7882, 0.6392, 0.6392),
988+
(0.7922, 0.6413, 0.6413),
989+
(0.8000, 0.6447, 0.6447),
990+
(0.8078, 0.6481, 0.6481),
991+
(0.8157, 0.6549, 0.6549),
992+
(0.8667, 0.6991, 0.6991),
993+
(0.8745, 0.7103, 0.7103),
994+
(0.8824, 0.7216, 0.7216),
995+
(0.8902, 0.7323, 0.7323),
996+
(0.8980, 0.7430, 0.7430),
997+
(0.9412, 0.8275, 0.8275),
998+
(0.9569, 0.8635, 0.8635),
999+
(0.9647, 0.8816, 0.8816),
1000+
(0.9961, 0.9733, 0.9733),
1001+
(1.0000, 0.9843, 0.9843),
1002+
),
1003+
'blue': (
1004+
(0.0, 0.0, 0.0000),
1005+
(0.0039, 0.1684, 0.1684),
1006+
(0.0078, 0.2212, 0.2212),
1007+
(0.0275, 0.4329, 0.4329),
1008+
(0.0314, 0.4549, 0.4549),
1009+
(0.2824, 0.5004, 0.5004),
1010+
(0.4667, 0.2748, 0.2748),
1011+
(0.5451, 0.3205, 0.3205),
1012+
(0.7843, 0.3961, 0.3961),
1013+
(0.8941, 0.6651, 0.6651),
1014+
(1.0000, 0.9843, 0.9843),
1015+
)
1016+
}
10141017

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

1027-
_gist_ncar_data = \
1028-
{'red': (
1029-
(0.0, 0.0, 0.0000),
1030-
(0.3098, 0.0000, 0.0000),
1031-
(0.3725, 0.3993, 0.3993),
1032-
(0.4235, 0.5003, 0.5003),
1033-
(0.5333, 1.0000, 1.0000),
1034-
(0.7922, 1.0000, 1.0000),
1035-
(0.8471, 0.6218, 0.6218),
1036-
(0.8980, 0.9235, 0.9235),
1037-
(1.0000, 0.9961, 0.9961),
1038-
), 'green': (
1039-
(0.0, 0.0, 0.0000),
1040-
(0.0510, 0.3722, 0.3722),
1041-
(0.1059, 0.0000, 0.0000),
1042-
(0.1569, 0.7202, 0.7202),
1043-
(0.1608, 0.7537, 0.7537),
1044-
(0.1647, 0.7752, 0.7752),
1045-
(0.2157, 1.0000, 1.0000),
1046-
(0.2588, 0.9804, 0.9804),
1047-
(0.2706, 0.9804, 0.9804),
1048-
(0.3176, 1.0000, 1.0000),
1049-
(0.3686, 0.8081, 0.8081),
1050-
(0.4275, 1.0000, 1.0000),
1051-
(0.5216, 1.0000, 1.0000),
1052-
(0.6314, 0.7292, 0.7292),
1053-
(0.6863, 0.2796, 0.2796),
1054-
(0.7451, 0.0000, 0.0000),
1055-
(0.7922, 0.0000, 0.0000),
1056-
(0.8431, 0.1753, 0.1753),
1057-
(0.8980, 0.5000, 0.5000),
1058-
(1.0000, 0.9725, 0.9725),
1059-
), 'blue': (
1060-
(0.0, 0.5020, 0.5020),
1061-
(0.0510, 0.0222, 0.0222),
1062-
(0.1098, 1.0000, 1.0000),
1063-
(0.2039, 1.0000, 1.0000),
1064-
(0.2627, 0.6145, 0.6145),
1065-
(0.3216, 0.0000, 0.0000),
1066-
(0.4157, 0.0000, 0.0000),
1067-
(0.4745, 0.2342, 0.2342),
1068-
(0.5333, 0.0000, 0.0000),
1069-
(0.5804, 0.0000, 0.0000),
1070-
(0.6314, 0.0549, 0.0549),
1071-
(0.6902, 0.0000, 0.0000),
1072-
(0.7373, 0.0000, 0.0000),
1073-
(0.7922, 0.9738, 0.9738),
1074-
(0.8000, 1.0000, 1.0000),
1075-
(0.8431, 1.0000, 1.0000),
1076-
(0.8980, 0.9341, 0.9341),
1077-
(1.0000, 0.9961, 0.9961),
1078-
)}
1030+
_gist_ncar_data = {
1031+
'red': (
1032+
(0.0, 0.0, 0.0000),
1033+
(0.3098, 0.0000, 0.0000),
1034+
(0.3725, 0.3993, 0.3993),
1035+
(0.4235, 0.5003, 0.5003),
1036+
(0.5333, 1.0000, 1.0000),
1037+
(0.7922, 1.0000, 1.0000),
1038+
(0.8471, 0.6218, 0.6218),
1039+
(0.8980, 0.9235, 0.9235),
1040+
(1.0000, 0.9961, 0.9961),
1041+
),
1042+
'green': (
1043+
(0.0, 0.0, 0.0000),
1044+
(0.0510, 0.3722, 0.3722),
1045+
(0.1059, 0.0000, 0.0000),
1046+
(0.1569, 0.7202, 0.7202),
1047+
(0.1608, 0.7537, 0.7537),
1048+
(0.1647, 0.7752, 0.7752),
1049+
(0.2157, 1.0000, 1.0000),
1050+
(0.2588, 0.9804, 0.9804),
1051+
(0.2706, 0.9804, 0.9804),
1052+
(0.3176, 1.0000, 1.0000),
1053+
(0.3686, 0.8081, 0.8081),
1054+
(0.4275, 1.0000, 1.0000),
1055+
(0.5216, 1.0000, 1.0000),
1056+
(0.6314, 0.7292, 0.7292),
1057+
(0.6863, 0.2796, 0.2796),
1058+
(0.7451, 0.0000, 0.0000),
1059+
(0.7922, 0.0000, 0.0000),
1060+
(0.8431, 0.1753, 0.1753),
1061+
(0.8980, 0.5000, 0.5000),
1062+
(1.0000, 0.9725, 0.9725),
1063+
),
1064+
'blue': (
1065+
(0.0, 0.5020, 0.5020),
1066+
(0.0510, 0.0222, 0.0222),
1067+
(0.1098, 1.0000, 1.0000),
1068+
(0.2039, 1.0000, 1.0000),
1069+
(0.2627, 0.6145, 0.6145),
1070+
(0.3216, 0.0000, 0.0000),
1071+
(0.4157, 0.0000, 0.0000),
1072+
(0.4745, 0.2342, 0.2342),
1073+
(0.5333, 0.0000, 0.0000),
1074+
(0.5804, 0.0000, 0.0000),
1075+
(0.6314, 0.0549, 0.0549),
1076+
(0.6902, 0.0000, 0.0000),
1077+
(0.7373, 0.0000, 0.0000),
1078+
(0.7922, 0.9738, 0.9738),
1079+
(0.8000, 1.0000, 1.0000),
1080+
(0.8431, 1.0000, 1.0000),
1081+
(0.8980, 0.9341, 0.9341),
1082+
(1.0000, 0.9961, 0.9961),
1083+
)
1084+
}
10791085

10801086
_gist_rainbow_data = (
10811087
(0.000, (1.00, 0.00, 0.16)),

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.