@@ -489,7 +489,7 @@ def checkdep_ps_distiller(s):
489489 flag = False
490490 _log .warning ('matplotlibrc ps.usedistiller option can not be used '
491491 'unless ghostscript 9.0 or later is installed on your '
492- 'system' )
492+ 'system. ' )
493493
494494 if s == 'xpdf' :
495495 pdftops_req = '3.0'
@@ -502,9 +502,9 @@ def checkdep_ps_distiller(s):
502502 pass
503503 else :
504504 flag = False
505- _log .warning (( 'matplotlibrc ps.usedistiller can not be set to '
506- 'xpdf unless xpdf-%s or later is installed on '
507- 'your system' ) % pdftops_req )
505+ _log .warning ('matplotlibrc ps.usedistiller can not be set to xpdf '
506+ ' unless xpdf-%s or later is installed on your '
507+ ' system.' , pdftops_req )
508508
509509 if flag :
510510 return s
@@ -523,21 +523,21 @@ def checkdep_usetex(s):
523523 if shutil .which ("tex" ) is None :
524524 flag = False
525525 _log .warning ('matplotlibrc text.usetex option can not be used unless '
526- 'TeX is installed on your system' )
526+ 'TeX is installed on your system. ' )
527527
528528 dvipng_v = checkdep_dvipng ()
529529 if not compare_versions (dvipng_v , dvipng_req ):
530530 flag = False
531531 _log .warning ('matplotlibrc text.usetex can not be used with *Agg '
532532 'backend unless dvipng-%s or later is installed on '
533- 'your system' % dvipng_req )
533+ 'your system.' , dvipng_req )
534534
535535 gs_exec , gs_v = checkdep_ghostscript ()
536536 if not compare_versions (gs_v , gs_req ):
537537 flag = False
538538 _log .warning ('matplotlibrc text.usetex can not be used unless '
539- 'ghostscript-%s or later is installed on your system'
540- % gs_req )
539+ 'ghostscript-%s or later is installed on your system.' ,
540+ gs_req )
541541
542542 return flag
543543
@@ -963,21 +963,21 @@ def _rc_params_in_file(fname, fail_on_error=False):
963963 tup = strippedline .split (':' , 1 )
964964 if len (tup ) != 2 :
965965 error_details = _error_details_fmt % (cnt , line , fname )
966- _log .warning ('Illegal %s' % error_details )
966+ _log .warning ('Illegal %s' , error_details )
967967 continue
968968 key , val = tup
969969 key = key .strip ()
970970 val = val .strip ()
971971 if key in rc_temp :
972- _log .warning ('Duplicate key in file "%s", line #%d' %
973- ( fname , cnt ) )
972+ _log .warning ('Duplicate key in file %r line #%d.' ,
973+ fname , cnt )
974974 rc_temp [key ] = (val , line , cnt )
975975 except UnicodeDecodeError :
976- _log .warning (
977- ( 'Cannot decode configuration file %s with '
978- 'encoding %s, check LANG and LC_* variables' )
979- % ( fname , locale .getpreferredencoding (do_setlocale = False ) or
980- 'utf-8 (default)' ) )
976+ _log .warning ('Cannot decode configuration file %s with encoding '
977+ '%s, check LANG and LC_* variables.' ,
978+ fname ,
979+ locale .getpreferredencoding (do_setlocale = False )
980+ or 'utf-8 (default)' )
981981 raise
982982
983983 config = RcParams ()
@@ -992,8 +992,8 @@ def _rc_params_in_file(fname, fail_on_error=False):
992992 config [key ] = val # try to convert to proper type or skip
993993 except Exception as msg :
994994 error_details = _error_details_fmt % (cnt , line , fname )
995- _log .warning ('Bad val "%s" on %s\n \t %s' %
996- ( val , error_details , msg ) )
995+ _log .warning ('Bad val %r on %s\n \t %s' ,
996+ val , error_details , msg )
997997
998998 for key , (val , line , cnt ) in rc_temp .items ():
999999 if key in defaultParams :
@@ -1004,8 +1004,8 @@ def _rc_params_in_file(fname, fail_on_error=False):
10041004 config [key ] = val # try to convert to proper type or skip
10051005 except Exception as msg :
10061006 error_details = _error_details_fmt % (cnt , line , fname )
1007- _log .warning ('Bad val "%s" on %s\n \t %s' %
1008- ( val , error_details , msg ) )
1007+ _log .warning ('Bad val %r on %s\n \t %s' ,
1008+ val , error_details , msg )
10091009 elif key in _deprecated_ignore_map :
10101010 version , alt_key = _deprecated_ignore_map [key ]
10111011 cbook .warn_deprecated (
0 commit comments