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

Skip to content

Commit 85519f0

Browse files
committed
decrease the number of ignored pep8 error classes
Signed-off-by: Thomas Hisch <[email protected]>
1 parent 1e822e9 commit 85519f0

File tree

11 files changed

+19
-17
lines changed

11 files changed

+19
-17
lines changed

examples/event_handling/pong_gtk.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
# http://www.scipy.org/wikis/topical_software/MatplotlibAnimation
88
import time
99

10-
import gtk
1110
import gobject
1211

1312
import matplotlib
@@ -22,7 +21,7 @@
2221

2322

2423
def start_anim(event):
25-
# gobject.idle_add(animation.draw,animation)
24+
# gobject.idle_add(animation.draw,animation)
2625
gobject.timeout_add(10, animation.draw, animation)
2726
canvas.mpl_disconnect(start_anim.cid)
2827

@@ -33,4 +32,4 @@ def start_anim(event):
3332
tstart = time.time()
3433
plt.grid() # to ensure proper background restore
3534
plt.show()
36-
print('FPS:', animation.cnt/(time.time() - tstart))
35+
print('FPS: %f' % animation.cnt/(time.time() - tstart))

examples/mplot3d/polys3d_demo.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,13 @@
44
import matplotlib.pyplot as plt
55
import numpy as np
66

7+
78
fig = plt.figure()
89
ax = fig.gca(projection='3d')
910

10-
cc = lambda arg: colorConverter.to_rgba(arg, alpha=0.6)
11+
12+
def cc(arg):
13+
return colorConverter.to_rgba(arg, alpha=0.6)
1114

1215
xs = np.arange(0, 10, 0.4)
1316
verts = []

examples/pylab_examples/contour_image.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@
2323
Z2 = bivariate_normal(X, Y, 1.5, 0.5, 1, 1)
2424
Z = (Z1 - Z2) * 10
2525

26-
levels = arange(-2.0, 1.601, 0.4) # Boost the upper limit to avoid truncation
27-
# errors.
26+
levels = arange(-2.0, 1.601, 0.4) # Boost the upper limit to avoid truncation errors.
2827

2928
norm = cm.colors.Normalize(vmax=abs(Z).max(), vmin=-abs(Z).max())
3029
cmap = cm.PRGn

examples/pylab_examples/demo_agg_filter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def smooth1d(x, window_len):
1111
s = np.r_[2*x[0] - x[window_len:1:-1], x, 2*x[-1] - x[-1:-window_len:-1]]
1212
w = np.hanning(window_len)
1313
y = np.convolve(w/w.sum(), s, mode='same')
14-
return y[window_len - 1 : -window_len + 1]
14+
return y[window_len-1:-window_len+1]
1515

1616

1717
def smooth2d(A, sigma=3):

examples/pylab_examples/demo_text_rotation_mode.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
#clf()
31
from mpl_toolkits.axes_grid1.axes_grid import ImageGrid
42

53

@@ -8,7 +6,8 @@ def test_rotation_mode(fig, mode, subplot_location):
86
va_list = "top center baseline bottom".split()
97
grid = ImageGrid(fig, subplot_location,
108
nrows_ncols=(len(va_list), len(ha_list)),
11-
share_all=True, aspect=True, #label_mode='1',
9+
share_all=True, aspect=True,
10+
#label_mode='1',
1211
cbar_mode=None)
1312

1413
for ha, ax in zip(ha_list, grid.axes_row[-1]):

examples/pylab_examples/fancyarrow_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def to_texstring(s):
2424

2525
for i, (stylename, styleclass) in enumerate(sorted(styles.items())):
2626
x = 3.2 + (i//nrow)*4
27-
y = (figheight - 0.7 - i%nrow) # /figheight
27+
y = (figheight - 0.7 - i % nrow) # /figheight
2828
p = mpatches.Circle((x, y), 0.2, fc="w")
2929
ax.add_patch(p)
3030

examples/pylab_examples/pie_demo2.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,10 @@
4444

4545
plt.subplot(the_grid[1, 1], aspect=1)
4646

47+
# Turn off shadow for tiny plot with exploded slice.
4748
patches, texts, autotexts = plt.pie(fracs, explode=explode,
4849
labels=labels, autopct='%.0f%%',
4950
shadow=False, radius=0.5)
50-
# Turn off shadow for tiny plot
51-
# with exploded slice.
5251
for t in texts:
5352
t.set_size('smaller')
5453
for t in autotexts:

examples/pylab_examples/stackplot_demo.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import numpy as np
22
from matplotlib import pyplot as plt
33

4-
fnx = lambda: np.random.randint(5, 50, 10)
4+
5+
def fnx():
6+
return np.random.randint(5, 50, 10)
7+
58
y = np.row_stack((fnx(), fnx(), fnx()))
69
x = np.arange(10)
710

examples/pylab_examples/usetex_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
X, X < 0, 'k--', # sharp interface
1414
linewidth=5)
1515

16-
## legend
16+
# legend
1717
pylab.legend((r'phase field', r'level set', r'composition', r'sharp interface'), shadow=True, loc=(0.01, 0.55))
1818

1919
ltext = pylab.gca().get_legend().get_texts()

examples/user_interfaces/interactive2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def __init__(self):
169169

170170
self.mark = self.text.get_buffer().create_mark("End", self.text.get_buffer().get_end_iter(), False)
171171

172-
# setup colors
172+
# setup colors
173173
self.style_banner = gtk.TextTag("banner")
174174
self.style_banner.set_property("foreground", "saddle brown")
175175

lib/matplotlib/tests/test_coding_standards.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ def test_pep8_conformance_examples():
276276
assert_pep8_conformance(dirname=exdir,
277277
extra_exclude_directories=blacklist,
278278
pep8_additional_ignore=PEP8_ADDITIONAL_IGNORE +
279-
['E203', 'E228', 'E261', 'E262', 'E501'],
279+
['E116', 'E501'],
280280
expected_bad_files=())
281281

282282

0 commit comments

Comments
 (0)