提交 c69c3037 authored 作者: Frederic's avatar Frederic

pep8

上级 c1ebb2fd
...@@ -421,7 +421,7 @@ def pfunc(params, outputs=None, mode=None, updates=None, givens=None, ...@@ -421,7 +421,7 @@ def pfunc(params, outputs=None, mode=None, updates=None, givens=None,
if profile is None: if profile is None:
profile = config.profile profile = config.profile
# profile -> True or False # profile -> True or False
if profile == True: if profile is True:
profile = ProfileStats(message=name) profile = ProfileStats(message=name)
# profile -> object # profile -> object
if type(profile) == str: if type(profile) == str:
......
...@@ -635,7 +635,8 @@ class ModuleCache(object): ...@@ -635,7 +635,8 @@ class ModuleCache(object):
self.stats[0] += 1 self.stats[0] += 1
return self.module_from_name[name] return self.module_from_name[name]
def refresh(self, age_thresh_use=None, delete_if_problem=False, cleanup=True): def refresh(self, age_thresh_use=None, delete_if_problem=False,
cleanup=True):
"""Update cache data by walking the cache directory structure. """Update cache data by walking the cache directory structure.
Load key.pkl files that have not been loaded yet. Load key.pkl files that have not been loaded yet.
...@@ -691,7 +692,7 @@ class ModuleCache(object): ...@@ -691,7 +692,7 @@ class ModuleCache(object):
files = os.listdir(root) files = os.listdir(root)
if not files: if not files:
rmtree_empty(root, ignore_nocleanup=True, rmtree_empty(root, ignore_nocleanup=True,
msg="empty dir") msg="empty dir")
continue continue
if 'delete.me' in files: if 'delete.me' in files:
rmtree(root, ignore_nocleanup=True, rmtree(root, ignore_nocleanup=True,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论