@@ -37,7 +37,7 @@ class _ConversionCache(object):
37
37
Parameters
38
38
----------
39
39
directory : str, optional
40
- Files are stored in this directory, defaults to `'test_cache'` in
40
+ Files are stored in this directory. Defaults to `'test_cache'` in
41
41
the overall Matplotlib cache directory.
42
42
max_size : int, optional
43
43
The flush method will delete files until their combined size is
@@ -54,7 +54,8 @@ def __init__(self, directory=None, max_size=int(1e8)):
54
54
self .cachedir = self .get_cache_dir ()
55
55
self .ensure_cache_dir ()
56
56
if not isinstance (max_size , int ):
57
- raise ValueError ("max_size is %s, expected int" % type (max_size ))
57
+ raise ValueError ("max_size is of type %s, expected int" %
58
+ type (max_size ))
58
59
self .max_size = max_size
59
60
self .cached_ext = '.png'
60
61
self .converter_version = {}
@@ -120,7 +121,9 @@ def _get_file_hash(self, path, block_size=2 ** 20):
120
121
if version_tag is None :
121
122
warnings .warn (
122
123
("Don't know the external converter for files with extension "
123
- "%s, cannot ensure cache invalidation on version update." )
124
+ "%s, cannot ensure cache invalidation on version update. "
125
+ "Either the relevant conversion program is missing or caching"
126
+ " is attempted for an unknown file type." )
124
127
% ext )
125
128
result = self ._get_file_hash_static (path , block_size , version_tag )
126
129
self .hash_cache [path ] = result
0 commit comments