8000 Clean up E302 in examples. · matplotlib/matplotlib@fe48ec7 · GitHub
[go: up one dir, main page]

Skip to content

Commit fe48ec7

Browse files
committed
Clean up E302 in examples.
1 parent d0671d9 commit fe48ec7

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

.flake8

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ per-file-ignores =
197197
examples/pyplots/annotate_transform.py: E251, E402
198198
examples/pyplots/annotation_basic.py: E402
199199
examples/pyplots/annotation_polar.py: E402
200-
examples/pyplots/auto_subplots_adjust.py: E302, E402
200+
examples/pyplots/auto_subplots_adjust.py: E402
201201
examples/pyplots/axline.py: E402
202202
examples/pyplots/boxplot_demo_pyplot.py: E402
203203
examples/pyplots/dollar_ticks.py: E402
@@ -275,7 +275,7 @@ per-file-ignores =
275275
examples/user_interfaces/gtk_spreadsheet_sgskip.py: E402
276276
examples/user_interfaces/mathtext_wx_sgskip.py: E402
277277
examples/user_interfaces/mpl_with_glade3_sgskip.py: E402
278-
examples/user_interfaces/pylab_with_gtk_sgskip.py: E302, E402
278+
examples/user_interfaces/pylab_with_gtk_sgskip.py: E402
279279
examples/user_interfaces/toolmanager_sgskip.py: E402
280280
examples/userdemo/connectionstyle_demo.py: E402
281281
examples/userdemo/custom_boxstyle01.py: E402

examples/pyplots/auto_subplots_adjust.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
ax.set_yticks((2, 5, 7))
2121
labels = ax.set_yticklabels(('really, really, really', 'long', 'labels'))
2222

23+
2324
def on_draw(event):
2425
bboxes = []
2526
for label in labels:
@@ -35,6 +36,7 @@ def on_draw(event):
3536
fig.subplots_adjust(left=1.1*bbox.width) # pad a little
3637
fig.canvas.draw()
3738

39+
3840
fig.canvas.mpl_connect('draw_event', on_draw)
3941

4042
plt.show()

examples/user_interfaces/pylab_with_gtk_sgskip.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,15 @@
4646
vbox.pack_start(label, False, False, 0)
4747
vbox.reorder_child(toolbar, -1)
4848

49+
4950
def update(event):
5051
if event.xdata is None:
5152
label.set_markup('Drag mouse over axes for position')
5253
else:
5354
label.set_markup(
5455
f'<span color="#ef0000">x,y=({event.xdata}, {event.ydata})</span>')
5556

57+
5658
fig.canvas.mpl_connect('motion_notify_event', update)
5759

5860
plt.show()

0 commit comments

Comments
 (0)
0