8000 MNT: Clean up unused noqa comments · matplotlib/matplotlib@9d6e216 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9d6e216

Browse files
committed
MNT: Clean up unused noqa comments
1 parent 3174980 commit 9d6e216

File tree

5 files changed

+8
-11
lines changed

5 files changed

+8
-11
lines changed

lib/matplotlib/__init__.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,5 +111,5 @@ def _preprocess_data(
111111
label_namer: str | None = ...
112112
) -> Callable: ...
113113

114-
from matplotlib.cm import _colormaps as colormaps
115-
from matplotlib.colors import _color_sequences as color_sequences
114+
from matplotlib.cm import _colormaps as colormaps # noqa: E402
115+
from matplotlib.colors import _color_sequences as color_sequences # noqa: E402

lib/matplotlib/backends/qt_compat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
if QT_API_ENV in ["pyqt5", "pyside2"]:
5050
QT_API = _ETS[QT_API_ENV]
5151
else:
52-
_QT_FORCE_QT5_BINDING = True # noqa
52+
_QT_FORCE_QT5_BINDING = True # noqa: F811
5353
QT_API = None
5454
# A non-Qt backend was selected but we still got there (possible, e.g., when
5555
# fully manually embedding Matplotlib in a Qt app without using pyplot).

lib/matplotlib/pyplot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4018,7 +4018,7 @@ def spy(
40184018
**kwargs,
40194019
)
40204020
if isinstance(__ret, cm.ScalarMappable):
4021-
sci(__ret) # noqa
4021+
sci(__ret)
40224022
return __ret
40234023

40244024

pyproject.toml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -192,15 +192,10 @@ convention = "numpy"
192192
"galleries/examples/user_interfaces/pylab_with_gtk4_sgskip.py" = ["E402"]
193193
"galleries/examples/userdemo/pgf_preamble_sgskip.py" = ["E402"]
194194

195-
"lib/matplotlib/__init__.py" = ["E402"]
196-
"lib/matplotlib/_animation_data.py" = ["E501"]
197195
"lib/matplotlib/_cm.py" = ["E202", "E203"]
198196
"lib/matplotlib/_mathtext.py" = ["E221"]
199197
"lib/matplotlib/_mathtext_data.py" = ["E203"]
200-
"lib/matplotlib/axes/__init__.py" = ["F403"]
201198
"lib/matplotlib/backends/backend_template.py" = ["F401"]
202-
"lib/matplotlib/font_manager.py" = ["E501"]
203-
"lib/matplotlib/image.py" = ["F403"]
204199
"lib/matplotlib/pylab.py" = ["F401", "F403"]
205200
"lib/matplotlib/pyplot.py" = ["F811"]
206201
"lib/matplotlib/tests/test_mathtext.py" = ["E501"]
@@ -209,7 +204,6 @@ convention = "numpy"
209204
"lib/mpl_toolkits/axes_grid1/axes_size.py" = ["E272"]
210205
"lib/mpl_toolkits/axisartist/angle_helper.py" = ["E221"]
211206
"lib/mpl_toolkits/mplot3d/proj3d.py" = ["E201"]
212-
"lib/pylab.py" = ["F403"]
213207

214208
"galleries/users_explain/artists/paths.py" = ["E402"]
215209
"galleries/users_explain/artists/patheffects_guide.py" = ["E402"]

tools/boilerplate.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,10 @@ def boilerplate_gen():
304304
'pcolormesh': 'sci(__ret)',
305305
'hist2d': 'sci(__ret[-1])',
306306
'imshow': 'sci(__ret)',
307-
'spy': 'if isinstance(__ret, cm.ScalarMappable): sci(__ret) # noqa',
307+
'spy': (
308+
'if isinstance(__ret, cm.ScalarMappable):\n'
309+
' sci(__ret)'
310+
),
308311
'quiver': 'sci(__ret)',
309312
'specgram': 'sci(__ret[-1])',
310313
'streamplot': 'sci(__ret.lines)',

0 commit comments

Comments
 (0)
0