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

Skip to content

Commit ab695ed

Browse files
committed
remove pep8 violations
1 parent 640067d commit ab695ed

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

lib/matplotlib/tests/test_figure.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from matplotlib import rcParams
66
from matplotlib.testing.decorators import image_comparison
77
from matplotlib.axes import Axes
8-
from matplotlib.ticker import FormatStrFormatter, AutoMinorLocator, FixedFormatter
8+
from matplotlib.ticker import AutoMinorLocator, FixedFormatter
99
import matplotlib.pyplot as plt
1010
import matplotlib.dates as mdates
1111
import numpy as np
@@ -237,18 +237,20 @@ def test_figaspect():
237237
w, h = plt.figaspect(np.zeros((2, 2)))
238238
assert h / w == 1
239239

240+
240241
def test_autofmt_xdate():
241242
for which in [None, 'both', 'major', 'minor']:
242243

243-
date = ['3 Jan 2013', '4 Jan 2013', '5 Jan 2013', '6 Jan 2013', '7 Jan 2013',
244-
'8 Jan 2013', '9 Jan 2013', '10 Jan 2013', '11 Jan 2013', '12 Jan 2013',
245-
'13 Jan 2013', '14 Jan 2013']
244+
date = ['3 Jan 2013', '4 Jan 2013', '5 Jan 2013', '6 Jan 2013',
245+
'7 Jan 2013', '8 Jan 2013', '9 Jan 2013', '10 Jan 2013', '11 Jan 2013',
246+
'12 Jan 2013', '13 Jan 2013', '14 Jan 2013']
246247

247-
time = ['16:44:00', '16:45:00', '16:46:00', '16:47:00', '16:48:00', '16:49:00',
248-
'16:51:00', '16:52:00', '16:53:00', '16:55:00', '16:56:00', '16:57:00']
248+
time = ['16:44:00', '16:45:00', '16:46:00', '16:47:00', '16:48:00',
249+
'16:49:00', '16:51:00', '16:52:00', '16:53:00', '16:55:00', '16:56:00',
250+
'16:57:00']
249251

250252
angle = 60
251-
minors = [1,2,3,4,5,6,7]
253+
minors = [1, 2, 3, 4, 5, 6, 7]
252254

253255
x = mdates.datestr2num(date)
254256
y = mdates.datestr2num(time)
@@ -264,7 +266,7 @@ def test_autofmt_xdate():
264266

265267
fig.autofmt_xdate(0.2, angle, 'right', which)
266268

267-
if((which == 'both') or (which == 'major') or (which == None)):
269+
if((which == 'both') or (which == 'major') or (which is None)):
268270
for label in fig.axes[0].get_xticklabels(False, 'major'):
269271
assert (int(label.get_rotation()) == angle)
270272

0 commit comments

Comments
 (0)