提交 88a30b02 authored 作者: Frederic Bastien's avatar Frederic Bastien

Fix flake8

上级 47735730
...@@ -651,14 +651,14 @@ def debugprint(r, prefix='', depth=-1, done=None, print_type=False, ...@@ -651,14 +651,14 @@ def debugprint(r, prefix='', depth=-1, done=None, print_type=False,
except ValueError: except ValueError:
return "" return ""
clients = " clients:" + str([(get_id_str(c, False), get_index(c)) clients = " clients:" + str([(get_id_str(c, False), get_index(c))
for c,i in r.clients]) for c, i in r.clients])
if profile is None or a not in profile.apply_time: if profile is None or a not in profile.apply_time:
print('%s%s%s %s%s \'%s\' %s %s %s%s%s' % (prefix, a.op, print('%s%s%s %s%s \'%s\' %s %s %s%s%s' % (prefix, a.op,
idx, idx,
id_str, type_str, id_str, type_str,
r_name, r_name,
destroy_map_str, destroy_map_str,
view_map_str, view_map_str,
o, data, clients), file=file) o, data, clients), file=file)
else: else:
op_time = profile.apply_time[a] op_time = profile.apply_time[a]
......
...@@ -278,12 +278,12 @@ def test_debugprint(): ...@@ -278,12 +278,12 @@ def test_debugprint():
s = s.getvalue() s = s.getvalue()
# The additional white space are needed! # The additional white space are needed!
reference = '\n'.join([ reference = '\n'.join([
"Elemwise{add,no_inplace} [id A] '' 0 clients:[('output', ''), ('[id C]', 1)]", "Elemwise{add,no_inplace} [id A] '' 0 clients:[('output', ''), ('[id C]', 1)]",
" |A [id D]", " |A [id D]",
" |B [id E]", " |B [id E]",
"Elemwise{sub,no_inplace} [id C] '' 1", "Elemwise{sub,no_inplace} [id C] '' 1",
" |Elemwise{add,no_inplace} [id A] '' 0 clients:[('output', ''), ('[id C]', 1)]", " |Elemwise{add,no_inplace} [id A] '' 0 clients:[('output', ''), ('[id C]', 1)]",
" |D [id F]", " |D [id F]",
]) + '\n' ]) + '\n'
if s != reference: if s != reference:
print('--' + s + '--') print('--' + s + '--')
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论