Skip to content

Commit b2e6e6d

Browse files
authored
Merge pull request #16427 from anntzer/exsty
Style-fix some examples and update .flake8 per-file-ignores.
2 parents bd02c9d + 4b43716 commit b2e6e6d

File tree

5 files changed

+19
-19
lines changed

5 files changed

+19
-19
lines changed

.flake8

+13-14
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ per-file-ignores =
101101

102102
examples/animation/frame_grabbing_sgskip.py: E402
103103
examples/axes_grid1/inset_locator_demo.py: E402
104-
examples/axes_grid1/scatter_hist_locatable_axes.py: E401, E402
104+
examples/axes_grid1/scatter_hist_locatable_axes.py: E402
105105
examples/axisartist/demo_curvelinear_grid.py: E402
106106
examples/color/color_by_yvalue.py: E402
107107
examples/color/color_cycle_default.py: E402
@@ -178,32 +178,31 @@ per-file-ignores =
178178
examples/pie_and_polar_charts/polar_legend.py: E402
179179
examples/pie_and_polar_charts/polar_scatter.py: E402
180180
examples/pyplots/align_ylabels.py: E402
181-
examples/pyplots/annotate_transform.py: E228, E251, E402
181+
examples/pyplots/annotate_transform.py: E251, E402
182182
examples/pyplots/annotation_basic.py: E402
183-
examples/pyplots/annotation_polar.py: E231, E402
184-
examples/pyplots/auto_subplots_adjust.py: E231, E302, E402
183+
examples/pyplots/annotation_polar.py: E402
184+
examples/pyplots/auto_subplots_adjust.py: E302, E402
185185
examples/pyplots/axline.py: E402
186-
examples/pyplots/boxplot_demo_pyplot.py: E231, E402
187-
examples/pyplots/compound_path_demo.py: E231
186+
examples/pyplots/boxplot_demo_pyplot.py: E402
188187
examples/pyplots/dollar_ticks.py: E402
189188
examples/pyplots/fig_axes_customize_simple.py: E402
190189
examples/pyplots/fig_axes_labels_simple.py: E402
191190
examples/pyplots/fig_x.py: E402
192-
examples/pyplots/pyplot_formatstr.py: E231, E402
193-
examples/pyplots/pyplot_mathtext.py: E231, E402
191+
examples/pyplots/pyplot_formatstr.py: E402
192+
examples/pyplots/pyplot_mathtext.py: E402
194193
examples/pyplots/pyplot_scales.py: E402
195-
examples/pyplots/pyplot_simple.py: E231, E402
194+
examples/pyplots/pyplot_simple.py: E402
196195
examples/pyplots/pyplot_text.py: E402
197196
examples/pyplots/pyplot_three.py: E402
198197
examples/pyplots/pyplot_two_subplots.py: E402
199-
examples/pyplots/text_commands.py: E231, E402
200-
examples/pyplots/text_layout.py: E231, E402
198+
examples/pyplots/text_commands.py: E402
199+
examples/pyplots/text_layout.py: E402
201200
examples/pyplots/whats_new_1_subplot3d.py: E402
202-
examples/pyplots/whats_new_98_4_fill_between.py: E225, E402
203-
examples/pyplots/whats_new_98_4_legend.py: E228, E402
201+
examples/pyplots/whats_new_98_4_fill_between.py: E402
202+
examples/pyplots/whats_new_98_4_legend.py: E402
204203
examples/pyplots/whats_new_99_axes_grid.py: E402
205204
examples/pyplots/whats_new_99_mplot3d.py: E402
206-
examples/pyplots/whats_new_99_spines.py: E231, E402
205+
examples/pyplots/whats_new_99_spines.py: E402
207206
examples/scales/power_norm.py: E402
208207
examples/scales/scales.py: E402
209208
examples/shapes_and_collections/artist_reference.py: E402

examples/axes_grid1/scatter_hist_locatable_axes.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@
7373
# The use of the following functions, methods and classes is shown
7474
# in this example:
7575

76-
import matplotlib, mpl_toolkits
76+
import matplotlib
77+
import mpl_toolkits
7778
mpl_toolkits.axes_grid1.axes_divider.make_axes_locatable
7879
matplotlib.axes.Axes.set_aspect
7980
matplotlib.axes.Axes.scatter

examples/pyplots/text_commands.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
ax.set_ylabel('ylabel')
2020

2121
ax.text(3, 8, 'boxed italics text in data coords', style='italic',
22-
bbox={'facecolor':'red', 'alpha':0.5, 'pad':10})
22+
bbox={'facecolor': 'red', 'alpha': 0.5, 'pad': 10})
2323

2424
ax.text(2, 6, r'an equation: $E=mc^2$', fontsize=15)
2525

examples/pyplots/whats_new_98_4_fill_between.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515
fig, ax = plt.subplots()
1616
ax.plot(x, y1, x, y2, color='black')
17-
ax.fill_between(x, y1, y2, where=y2 >y1, facecolor='yellow', alpha=0.5)
18-
ax.fill_between(x, y1, y2, where=y2 <=y1, facecolor='red', alpha=0.5)
17+
ax.fill_between(x, y1, y2, where=(y2 > y1), facecolor='yellow', alpha=0.5)
18+
ax.fill_between(x, y1, y2, where=(y2 <= y1), facecolor='red', alpha=0.5)
1919
ax.set_title('Fill Between')
2020

2121
plt.show()

examples/pyplots/whats_new_98_4_legend.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
ax = plt.subplot(111)
1313
t1 = np.arange(0.0, 1.0, 0.01)
1414
for n in [1, 2, 3, 4]:
15-
plt.plot(t1, t1**n, label="n=%d"%(n,))
15+
plt.plot(t1, t1**n, label=f"n={n}")
1616

1717
leg = plt.legend(loc='best', ncol=2, mode="expand", shadow=True, fancybox=True)
1818
leg.get_frame().set_alpha(0.5)

0 commit comments

Comments
 (0)