提交 a34ef6c4 authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Make test_flake8 itself flake8-compliant...

上级 497bf2b6
......@@ -38,7 +38,6 @@ whitelist_flake8 = [
"tests/test_record.py",
"tests/__init__.py",
"tests/test_updates.py",
"tests/test_flake8.py",
"tests/main.py",
"tests/test_pickle_unpickle_theano_fn.py",
"tests/test_determinism.py",
......@@ -346,7 +345,7 @@ whitelist_flake8 = [
]
def list_files(dir_path = theano.__path__[0], pattern = '*.py'):
def list_files(dir_path=theano.__path__[0], pattern='*.py'):
"""
List all files under theano's path.
"""
......@@ -416,8 +415,9 @@ def check_all_files(dir_path=theano.__path__[0], pattern='*.py'):
if fnmatch(f, pattern):
error_num = flake8.main.check_file(os.path.join(dir, f))
if error_num > 0:
path = os.path.relpath(os.path.join(dir, f), theano.__path__[0])
f_txt.write('"'+ path + '",\n')
path = os.path.relpath(os.path.join(dir, f),
theano.__path__[0])
f_txt.write('"' + path + '",\n')
f_txt.close()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论