Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8829e7e

Browse filesBrowse files
committed
fix for flake8
1 parent 98dd012 commit 8829e7e
Copy full SHA for 8829e7e

File tree

Expand file treeCollapse file tree

2 files changed

+5
-4
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+5
-4
lines changed

‎lib/matplotlib/axes/_axes.py

Copy file name to clipboardExpand all lines: lib/matplotlib/axes/_axes.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5748,9 +5748,9 @@ def _pcolorargs(self, funcname, *args, shading='auto', **kwargs):
57485748

57495749
if shading == 'flat':
57505750
if (Nx, Ny) != (ncols + 1, nrows + 1):
5751-
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)' % (
5753-
C.shape, Nx, Ny, funcname))
5751+
raise TypeError(f"Dimensions of X({Nx}) and y({Ny}) should"
5752+
f"be one larger than C{C.shape}"
5753+
f"see help({funcname})")
57545754
else: # ['nearest', 'gouraud']:
57555755
if (Nx, Ny) != (ncols, nrows):
57565756
raise TypeError('Dimensions of C %s are incompatible with'

‎lib/matplotlib/tests/test_axes.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_axes.py
+2-1Lines 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".*one larger than C"):
14461447
ax.pcolormesh(x, y, Z, shading='flat')
14471448

14481449

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.