Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
e810b0b7
提交
e810b0b7
authored
5月 23, 2015
作者:
Arnaud Bergeron
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Flake8 for gof/lazylinker_c.py
上级
9c605c00
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
8 行增加
和
8 行删除
+8
-8
lazylinker_c.py
theano/gof/lazylinker_c.py
+8
-7
test_flake8.py
theano/tests/test_flake8.py
+0
-1
没有找到文件。
theano/gof/lazylinker_c.py
浏览文件 @
e810b0b7
...
@@ -15,12 +15,13 @@ _logger = logging.getLogger('theano.gof.lazylinker_c')
...
@@ -15,12 +15,13 @@ _logger = logging.getLogger('theano.gof.lazylinker_c')
force_compile
=
False
force_compile
=
False
version
=
0.21
# must match constant returned in function get_version()
version
=
0.21
# must match constant returned in function get_version()
lazylinker_ext
=
None
def
try_import
():
def
try_import
():
global
lazylinker_ext
global
lazylinker_ext
sys
.
path
[
0
:
0
]
=
[
config
.
compiledir
]
sys
.
path
[
0
:
0
]
=
[
config
.
compiledir
]
import
lazylinker_ext
import
lazylinker_ext
# noqa
del
sys
.
path
[
0
]
del
sys
.
path
[
0
]
...
@@ -43,11 +44,11 @@ try:
...
@@ -43,11 +44,11 @@ try:
# Try to make the location
# Try to make the location
os
.
mkdir
(
location
)
os
.
mkdir
(
location
)
except
OSError
as
e
:
except
OSError
as
e
:
# If we get an error, verify that the error was # 17, the
path already exists,
# If we get an error, verify that the error was # 17, the
#
and that it is a directory
#
path already exists, and that it is a directory Note: we
#
Note: we can't check if it exists before making it, because we are not holding
#
can't check if it exists before making it, because we
#
the lock right now, so we could race another process and get error 17 if we los
e
#
are not holding the lock right now, so we could rac
e
# the race
#
another process and get error 17 if we lose
the race
assert
e
.
errno
==
errno
.
EEXIST
assert
e
.
errno
==
errno
.
EEXIST
assert
os
.
path
.
isdir
(
location
)
assert
os
.
path
.
isdir
(
location
)
...
@@ -142,5 +143,5 @@ except ImportError:
...
@@ -142,5 +143,5 @@ except ImportError:
# Release lock on compilation directory.
# Release lock on compilation directory.
release_lock
()
release_lock
()
from
lazylinker_ext.lazylinker_ext
import
*
from
lazylinker_ext.lazylinker_ext
import
*
# noqa
assert
force_compile
or
(
version
==
get_version
())
assert
force_compile
or
(
version
==
get_version
())
theano/tests/test_flake8.py
浏览文件 @
e810b0b7
...
@@ -269,7 +269,6 @@ whitelist_flake8 = [
...
@@ -269,7 +269,6 @@ whitelist_flake8 = [
"sparse/sandbox/sp.py"
,
"sparse/sandbox/sp.py"
,
"gof/destroyhandler.py"
,
"gof/destroyhandler.py"
,
"gof/unify.py"
,
"gof/unify.py"
,
"gof/lazylinker_c.py"
,
"gof/optdb.py"
,
"gof/optdb.py"
,
"gof/utils.py"
,
"gof/utils.py"
,
"gof/graph.py"
,
"gof/graph.py"
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论