Skip to content

Commit 937f4c9

Browse files
committed
fix for the flask8
1 parent 0732c7d commit 937f4c9

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4598,6 +4598,8 @@ def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None,
45984598
orig_edgecolor = edgecolors
45994599
if edgecolors is None:
46004600
orig_edgecolor = kwargs.get('edgecolor', None)
4601+
4602+
46014603
c, colors, edgecolors = \
46024604
self._parse_scatter_color_args(
46034605
c, edgecolors, kwargs, x.size,
@@ -5749,7 +5751,8 @@ def _pcolorargs(self, funcname, *args, shading='auto', **kwargs):
57495751
if shading == 'flat':
57505752
if (Nx, Ny) != (ncols + 1, nrows + 1):
57515753
raise TypeError('Dimensions of C %s are incompatible with'
5752-
' X (%d) and/or Y (%d); X and y should be one larger than C see help(%s)' % (
5754+
' X (%d) and/or Y (%d); X and y'
5755+
'should be one larger than C see help(%s)' % (
57535756
C.shape, Nx, Ny, funcname))
57545757
else: # ['nearest', 'gouraud']:
57555758
if (Nx, Ny) != (ncols, nrows):

lib/matplotlib/tests/test_axes.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1438,11 +1438,12 @@ def test_pcolorflaterror():
14381438
with pytest.raises(TypeError, match='Dimensions of C'):
14391439
ax.pcolormesh(x, y, Z, shading='flat')
14401440

1441+
14411442
def test_samesizepcolorflaterror():
14421443
fig, ax = plt.subplots()
14431444
x, y = np.meshgrid(np.arange(5), np.arange(3))
14441445
Z = x + y
1445-
with pytest.raises(TypeError, match=r".*X and y should be one larger than C"):
1446+
with pytest.raises(TypeError, match=r".*should be one larger than C"):
14461447
ax.pcolormesh(x, y, Z, shading='flat')
14471448

14481449

0 commit comments

Comments
 (0)