Skip to content

Commit ea8617d

Browse files
committed
fix E201 and E202 pep8 errors
Signed-off-by: Thomas Hisch <t.hisch@gmail.com>
1 parent ed31fee commit ea8617d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+160
-160
lines changed

examples/event_handling/looking_glass.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
x, y = np.random.rand(2, 200)
55

66
fig, ax = plt.subplots()
7-
circ = patches.Circle( (0.5, 0.5), 0.25, alpha=0.8, fc='yellow')
7+
circ = patches.Circle((0.5, 0.5), 0.25, alpha=0.8, fc='yellow')
88
ax.add_patch(circ)
99

1010

examples/event_handling/pipong.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,15 +145,15 @@ def __init__(self, ax):
145145
self.inst = True # show instructions from the beginning
146146
self.background = None
147147
self.pads = []
148-
self.pads.append( Pad(pA,0,padAy))
149-
self.pads.append( Pad(pB,padBx,padBy,'r'))
148+
self.pads.append(Pad(pA,0,padAy))
149+
self.pads.append(Pad(pB,padBx,padBy,'r'))
150150
self.pucks =[]
151151
self.i = self.ax.annotate(instructions,(.5,0.5),
152152
name='monospace',
153153
verticalalignment='center',
154154
horizontalalignment='center',
155155
multialignment='left',
156-
textcoords='axes fraction',animated=True )
156+
textcoords='axes fraction',animated=True)
157157
self.canvas.mpl_connect('key_press_event', self.key_press)
158158

159159
def draw(self, evt):

examples/misc/contour_manual.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
import matplotlib.cm as cm
77

88
# Contour lines for each level are a list/tuple of polygons.
9-
lines0 = [ [[0,0],[0,4]] ]
10-
lines1 = [ [[2,0],[1,2],[1,3]] ]
11-
lines2 = [ [[3,0],[3,2]], [[3,3],[3,4]] ] # Note two lines.
9+
lines0 = [[[0,0],[0,4]]]
10+
lines1 = [[[2,0],[1,2],[1,3]]]
11+
lines2 = [[[3,0],[3,2]], [[3,3],[3,4]]] # Note two lines.
1212

1313
# Filled contours between two levels are also a list/tuple of polygons.
1414
# Points can be ordered clockwise or anticlockwise.
15-
filled01 = [ [[0,0],[0,4],[1,3],[1,2],[2,0]] ]
16-
filled12 = [ [[2,0],[3,0],[3,2],[1,3],[1,2]], # Note two polygons.
17-
[[1,4],[3,4],[3,3]] ]
15+
filled01 = [[[0,0],[0,4],[1,3],[1,2],[2,0]]]
16+
filled12 = [[[2,0],[3,0],[3,2],[1,3],[1,2]], # Note two polygons.
17+
[[1,4],[3,4],[3,3]]]
1818

1919

2020
plt.figure()
@@ -38,8 +38,8 @@
3838
# Here a code type of 1 is a MOVETO, and 2 is a LINETO.
3939

4040
plt.figure()
41-
filled01 = [ [[0,0],[3,0],[3,3],[0,3],[1,1],[1,2],[2,2],[2,1]] ]
42-
kinds01 = [ [1,2,2,2,1,2,2,2] ]
41+
filled01 = [[[0,0],[3,0],[3,3],[0,3],[1,1],[1,2],[2,2],[2,1]]]
42+
kinds01 = [[1,2,2,2,1,2,2,2]]
4343
cs = ContourSet(plt.gca(), [0,1], [filled01], [kinds01], filled=True)
4444
cbar = plt.colorbar(cs)
4545

examples/misc/rc_traits.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
doprint = True
1414
flexible_true_trait = traits.Trait(
1515
True,
16-
{ 'true': True, 't': True, 'yes': True, 'y': True, 'on': True, True: True,
16+
{'true': True, 't': True, 'yes': True, 'y': True, 'on': True, True: True,
1717
'false': False, 'f': False, 'no': False, 'n': False, 'off': False, False: False
18-
} )
19-
flexible_false_trait = traits.Trait( False, flexible_true_trait )
18+
})
19+
flexible_false_trait = traits.Trait(False, flexible_true_trait)
2020

2121
colors = {
2222
'c' : '#00bfbf',

examples/pylab_examples/anscombe.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def fit(x):
2323
return 3+0.5*x
2424

2525

26-
xfit = array( [amin(x), amax(x) ] )
26+
xfit = array([amin(x), amax(x)])
2727

2828
subplot(221)
2929
plot(x,y1,'ks', xfit, fit(xfit), 'r-', lw=2)

examples/pylab_examples/axes_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
# the main axes is subplot(111) by default
1313
plot(t, s)
14-
axis([0, 1, 1.1*amin(s), 2*amax(s) ])
14+
axis([0, 1, 1.1*amin(s), 2*amax(s)])
1515
xlabel('time (s)')
1616
ylabel('current (nA)')
1717
title('Gaussian colored noise')

examples/pylab_examples/axis_equal_demo.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,22 @@
77
an = linspace(0,2*pi,100)
88

99
subplot(221)
10-
plot( 3*cos(an), 3*sin(an) )
10+
plot(3*cos(an), 3*sin(an))
1111
title('not equal, looks like ellipse',fontsize=10)
1212

1313
subplot(222)
14-
plot( 3*cos(an), 3*sin(an) )
14+
plot(3*cos(an), 3*sin(an))
1515
axis('equal')
1616
title('equal, looks like circle',fontsize=10)
1717

1818
subplot(223)
19-
plot( 3*cos(an), 3*sin(an) )
19+
plot(3*cos(an), 3*sin(an))
2020
axis('equal')
2121
axis([-3,3,-3,3])
2222
title('looks like circle, even after changing limits',fontsize=10)
2323

2424
subplot(224)
25-
plot( 3*cos(an), 3*sin(an) )
25+
plot(3*cos(an), 3*sin(an))
2626
axis('equal')
2727
axis([-3,3,-3,3])
2828
plot([0,4],[0,4])

examples/pylab_examples/bar_stacked.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818

1919
plt.ylabel('Scores')
2020
plt.title('Scores by group and gender')
21-
plt.xticks(ind+width/2., ('G1', 'G2', 'G3', 'G4', 'G5') )
21+
plt.xticks(ind+width/2., ('G1', 'G2', 'G3', 'G4', 'G5'))
2222
plt.yticks(np.arange(0,81,10))
23-
plt.legend( (p1[0], p2[0]), ('Men', 'Women') )
23+
plt.legend((p1[0], p2[0]), ('Men', 'Women'))
2424

2525
plt.show()

examples/pylab_examples/boxplot_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
center = ones(25) * 40
4242
flier_high = rand(10) * 100 + 100
4343
flier_low = rand(10) * -100
44-
d2 = concatenate( (spread, center, flier_high, flier_low), 0 )
44+
d2 = concatenate((spread, center, flier_high, flier_low), 0)
4545
data.shape = (-1, 1)
4646
d2.shape = (-1, 1)
4747
#data = concatenate( (data, d2), 1 )

examples/pylab_examples/boxplot_demo3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ def fakeBootStrapper(n):
4242

4343
ax.set_xlabel('treatment')
4444
ax.set_ylabel('response')
45-
plt.setp(bp['whiskers'], color='k', linestyle='-' )
45+
plt.setp(bp['whiskers'], color='k', linestyle='-')
4646
plt.setp(bp['fliers'], markersize=3.0)
4747
plt.show()

0 commit comments

Comments
 (0)