提交 03252057 authored 作者: Iban Harlouchet's avatar Iban Harlouchet 提交者: Iban Harlouchet

flake8 for theano/misc/strutil.py

上级 31c0fd72
import warnings
from six.moves import xrange
......@@ -26,7 +25,8 @@ def render_string(string, sub):
finalCode = string[0:i] % sub
except Exception as F:
if str(F) == str(E):
raise Exception(string[0:i]+"<<<< caused exception "+str(F))
raise Exception(
string[0:i] + "<<<< caused exception " + str(F))
i += 1
assert False
return finalCode
......@@ -35,7 +35,7 @@ def render_string(string, sub):
def pretty_format(string):
lines = string.split('\n')
lines = [ strip_leading_white_space(line) for line in lines ]
lines = [strip_leading_white_space(line) for line in lines]
indent = 0
for i in xrange(len(lines)):
......@@ -43,7 +43,7 @@ def pretty_format(string):
if indent < 0:
indent = 0
#
lines[i] = (' '*indent) + lines[i]
lines[i] = (' ' * indent) + lines[i]
indent += lines[i].count('{')
#
......
......@@ -184,7 +184,6 @@ whitelist_flake8 = [
"scan_module/scan_opt.py",
"scan_module/tests/test_scan.py",
"scan_module/tests/test_scan_opt.py",
"misc/strutil.py",
"misc/gnumpy_utils.py",
"misc/may_share_memory.py",
"misc/safe_asarray.py",
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论