提交 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,
except ValueError:
return ""
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:
print('%s%s%s %s%s \'%s\' %s %s %s%s%s' % (prefix, a.op,
idx,
id_str, type_str,
r_name,
destroy_map_str,
view_map_str,
idx,
id_str, type_str,
r_name,
destroy_map_str,
view_map_str,
o, data, clients), file=file)
else:
op_time = profile.apply_time[a]
......
......@@ -278,12 +278,12 @@ def test_debugprint():
s = s.getvalue()
# The additional white space are needed!
reference = '\n'.join([
"Elemwise{add,no_inplace} [id A] '' 0 clients:[('output', ''), ('[id C]', 1)]",
" |A [id D]",
" |B [id E]",
"Elemwise{sub,no_inplace} [id C] '' 1",
" |Elemwise{add,no_inplace} [id A] '' 0 clients:[('output', ''), ('[id C]', 1)]",
" |D [id F]",
"Elemwise{add,no_inplace} [id A] '' 0 clients:[('output', ''), ('[id C]', 1)]",
" |A [id D]",
" |B [id E]",
"Elemwise{sub,no_inplace} [id C] '' 1",
" |Elemwise{add,no_inplace} [id A] '' 0 clients:[('output', ''), ('[id C]', 1)]",
" |D [id F]",
]) + '\n'
if s != reference:
print('--' + s + '--')
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论