Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit eaf2e32

Browse files
committed
Re-enable PEP8 for examples.
Due to the removal of the symlink in #11141, pytest was no longer picking up the examples and running pep8 on them.
1 parent 3a5d8c2 commit eaf2e32

15 files changed

+19
-23
lines changed

examples/api/histogram_path.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,14 @@
6565
codes = np.ones(nverts, int) * path.Path.LINETO
6666
codes[0::5] = path.Path.MOVETO
6767
codes[4::5] = path.Path.CLOSEPOLY
68-
verts[0::5,0] = left
69-
verts[0::5,1] = bottom
70-
verts[1::5,0] = left
71-
verts[1::5,1] = top
72-
verts[2::5,0] = right
73-
verts[2::5,1] = top
74-
verts[3::5,0] = right
75-
verts[3::5,1] = bottom
68+
verts[0::5, 0] = left
69+
verts[0::5, 1] = bottom
70+
verts[1::5, 0] = left
71+
verts[1::5, 1] = top
72+
verts[2::5, 0] = right
73+
verts[2::5, 1] = top
74+
verts[3::5, 0] = right
75+
verts[3::5, 1] = bottom
7676

7777
barpath = path.Path(verts, codes)
7878

@@ -95,6 +95,6 @@
9595
matplotlib.axes.Axes.add_patch
9696
matplotlib.collections.PathCollection
9797

98-
# This example shows an alternative to
98+
# This example shows an alternative to:
9999
matplotlib.collections.PolyCollection
100100
matplotlib.axes.Axes.hist

examples/api/sankey_links.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,3 @@ def corner(sankey):
7373
matplotlib.sankey.Sankey
7474
matplotlib.sankey.Sankey.add
7575
matplotlib.sankey.Sankey.finish
76-

examples/axisartist/demo_parasite_axes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
==================
55
66
Create a parasite axes. Such axes would share the x scale with a host axes,
7-
but show a different scale in y direction.
7+
but show a different scale in y direction.
88
99
Note that this approach uses the `~mpl_toolkits.axes_grid1.parasite_axes`\'
1010
`~.mpl_toolkits.axes_grid1.parasite_axes.HostAxes` and

examples/axisartist/demo_parasite_axes2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
1515
Note that this approach uses the `mpl_toolkits.axes_grid1.parasite_axes`\'
1616
`~mpl_toolkits.axes_grid1.parasite_axes.host_subplot` and
17-
`mpl_toolkits.axisartist.axislines.Axes`. An alternative approach using the
17+
`mpl_toolkits.axisartist.axislines.Axes`. An alternative approach using the
1818
`~mpl_toolkits.axes_grid1.parasite_axes`\'s
1919
`~.mpl_toolkits.axes_grid1.parasite_axes.HostAxes` and
2020
`~.mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxes` is the

examples/images_contours_and_fields/barb_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,3 @@
6565
import matplotlib
6666
matplotlib.axes.Axes.barbs
6767
matplotlib.pyplot.barbs
68-

examples/images_contours_and_fields/image_masked.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,4 +91,3 @@
9191
matplotlib.pyplot.colorbar
9292
matplotlib.colors.BoundaryNorm
9393
matplotlib.colorbar.ColorbarBase.set_label
94-

examples/images_contours_and_fields/pcolor_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Generating images with :meth:`~.axes.Axes.pcolor`.
77
88
Pcolor allows you to generate 2-D image-style plots. Below we will show how
9-
to do so in Matplotlib.
9+
to do so in Matplotlib.
1010
"""
1111
import matplotlib.pyplot as plt
1212
import numpy as np

examples/images_contours_and_fields/plot_streamplot.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,3 @@
8585
matplotlib.pyplot.streamplot
8686
matplotlib.gridspec
8787
matplotlib.gridspec.GridSpec
88-

examples/images_contours_and_fields/quiver_simple_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,3 @@
3636
matplotlib.pyplot.quiver
3737
matplotlib.axes.Axes.quiverkey
3838
matplotlib.pyplot.quiverkey
39-

examples/lines_bars_and_markers/marker_reference.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ def split_list(a_list):
6565
plt.show()
6666

6767

68-
6968
###############################################################################
7069
# Plot all filled markers.
7170

examples/pyplots/align_ylabels.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import numpy as np
1111
import matplotlib.pyplot as plt
1212

13+
1314
def make_plot(axs):
1415
box = dict(facecolor='yellow', pad=5, alpha=0.2)
1516

examples/pyplots/pyplot_scales.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,4 @@
7979
matplotlib.pyplot.gca
8080
matplotlib.pyplot.yscale
8181
matplotlib.ticker.NullFormatter
82-
matplotlib.axis.Axis.set_minor_formatter
82+
matplotlib.axis.Axis.set_minor_formatter

examples/pyplots/whats_new_1_subplot3d.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@
4545
# The use of the following functions, methods, classes and modules is shown
4646
# in this example:
4747

48-
import matplotlib, mpl_toolkits
48+
import matplotlib
49+
import mpl_toolkits
4950
matplotlib.figure.Figure.add_subplot
5051
mpl_toolkits.mplot3d.axes3d.Axes3D.plot_surface
5152
mpl_toolkits.mplot3d.axes3d.Axes3D.plot_wireframe

examples/text_labels_and_annotations/usetex_demo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
xytext=(delta / 2., 0.1), textcoords='data',
3030
arrowprops=dict(arrowstyle="<->", connectionstyle="arc3"))
3131
plt.text(0, 0.1, r'$\delta$',
32-
{'color': 'k', 'fontsize': 24, 'ha' : 'center', 'va' : 'center',
33-
'bbox' : dict(boxstyle="round", fc="w", ec="k", pad=0.2)})
32+
{'color': 'k', 'fontsize': 24, 'ha': 'center', 'va': 'center',
33+
'bbox': dict(boxstyle="round", fc="w", ec="k", pad=0.2)})
3434

3535
# Use tex in labels
3636
plt.xticks((-1, 0, 1), ('$-1$', r'$\pm 0$', '$+1$'), color='k', size=20)

pytest.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[pytest]
2-
testpaths = lib
2+
testpaths = lib examples
33
python_files = test_*.py
44

55
markers =

0 commit comments

Comments
 (0)