8000 use f-string for error message · matplotlib/matplotlib@ee9317e · GitHub
[go: up one dir, main page]

Skip to content

Commit ee9317e

Browse files
rcomergreglucas
andcommitted
use f-string for error message
Co-authored-by: Greg Lucas <greg.m.lucas@gmail.com>
1 parent 511232b commit ee9317e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/collections.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -613,8 +613,8 @@ def set_linestyle(self, ls):
613613
try:
614614
dashes = [mlines._get_dash_pattern(x) for x in ls]
615615
except ValueError as err:
616-
raise ValueError('Do not know how to convert {!r} to '
617-
'dashes'.format(ls)) from err
616+
emsg = f'Do not know how to convert {ls!r} to dashes'
617+
raise ValueError(emsg) from err
618618

619619
# get the list of raw 'unscaled' dash patterns
620620
self._us_linestyles = dashes

0 commit comments

Comments
 (0)
0