Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commita8fcb75

Browse files
committed
Improve wording
1 parentbb22d11 commita8fcb75

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

‎lib/matplotlib/testing/_conversion_cache.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class _ConversionCache(object):
3737
Parameters
3838
----------
3939
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
4141
the overall Matplotlib cache directory.
4242
max_size : int, optional
4343
The flush method will delete files until their combined size is
@@ -54,7 +54,8 @@ def __init__(self, directory=None, max_size=int(1e8)):
5454
self.cachedir=self.get_cache_dir()
5555
self.ensure_cache_dir()
5656
ifnotisinstance(max_size,int):
57-
raiseValueError("max_size is %s, expected int"%type(max_size))
57+
raiseValueError("max_size is of type %s, expected int"%
58+
type(max_size))
5859
self.max_size=max_size
5960
self.cached_ext='.png'
6061
self.converter_version= {}
@@ -120,7 +121,9 @@ def _get_file_hash(self, path, block_size=2 ** 20):
120121
ifversion_tagisNone:
121122
warnings.warn(
122123
("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.")
124127
%ext)
125128
result=self._get_file_hash_static(path,block_size,version_tag)
126129
self.hash_cache[path]=result

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp