Skip to content

Commit b036809

Browse files
committed
Use f-string in error message
1 parent 15d8932 commit b036809

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6462,9 +6462,8 @@ def _pcolorargs(self, funcname, *args, shading='auto', **kwargs):
64626462
Y = 0.25 * (Y[:-1, :-1] + Y[:-1, 1:] + Y[1:, 1:] + Y[1:, :-1])
64636463
shading = 'gouraud'
64646464
else:
6465-
raise TypeError('Dimensions of C %s are incompatible with'
6466-
' X (%d) and/or Y (%d); see help(%s)' % (
6467-
C.shape, Nx, Ny, funcname))
6465+
raise TypeError(f'Dimensions of C {C.shape} are incompatible with'
6466+
f' X ({Nx}) and/or Y ({Ny}); see help({funcname})')
64686467
if shading == 'nearest':
64696468
# grid is specified at the center, so define corners
64706469
# at the midpoints between the grid centers and then use the

0 commit comments

Comments
 (0)