10000 made code flake 8 compatible · matplotlib/matplotlib@fe18d37 · GitHub
[go: up one dir, main page]

Skip to content

Commit fe18d37

Browse files
committed
made code flake 8 compatible
1 parent 942ee4d commit fe18d37

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

lib/matplotlib/projections/polar.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -997,12 +997,12 @@ def set_thetalim(self, *args, **kwargs):
997997
if 'thetamax' in kwargs:
998998
thetamax = np.deg2rad(kwargs.pop('thetamax'))
999999
kwargs['xmax'] = thetamax
1000-
1000+
10011001
if args.__len__() == 2:
10021002
if args[0] is not None and args[1] is not None:
10031003
if(abs(args[1] - args[0]) > 2 * np.pi):
10041004
raise ValueError('Cannot pass angle range > 2 pi')
1005-
1005+
10061006
if 'xmin' in kwargs and 'xmax' in kwargs:
10071007
if(abs(thetamax - thetamin) > 2 * np.pi):
10081008
raise ValueError('Cannot pass angle range > 2 pi')

lib/matplotlib/tests/test_subplots.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,12 @@ def test_dont_mutate_kwargs():
174174
assert subplot_kw == {'sharex': 'all'}
175175
assert gridspec_kw == {'width_ratios': [1, 2]}
176176

177+
177178
def test_subplot_theta_min_max():
178179
with pytest.raises(ValueError, match="Cannot pass angle range > 2 pi"):
179180
ax = plt.subplot(111, projection='polar')
180-
ax.set_thetalim(thetamin = 800, thetamax=400)
181+
ax.set_thetalim(thetamin=800, thetamax=400)
182+
181183

182184
def test_subplot_theta_range():
183185
with pytest.raises(ValueError, match="Cannot pass angle range > 2 pi"):

0 commit comments

Comments
 (0)
0