Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
31c0fd72
提交
31c0fd72
authored
7月 09, 2015
作者:
Iban Harlouchet
提交者:
Iban Harlouchet
7月 23, 2015
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
flake8 for theano/misc/ordered_set.py
上级
f09999ce
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
8 行增加
和
7 行删除
+8
-7
ordered_set.py
theano/misc/ordered_set.py
+8
-6
test_flake8.py
theano/tests/test_flake8.py
+0
-1
没有找到文件。
theano/misc/ordered_set.py
浏览文件 @
31c0fd72
from
__future__
import
print_function
from
__future__
import
print_function
from
collections
import
MutableSet
from
collections
import
MutableSet
from
theano.compat
import
OrderedDict
import
types
import
types
import
weakref
from
six
import
string_types
from
six
import
string_types
...
@@ -37,7 +38,7 @@ def check_deterministic(iterable):
...
@@ -37,7 +38,7 @@ def check_deterministic(iterable):
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# {{{ http://code.activestate.com/recipes/576696/ (r5)
# {{{ http://code.activestate.com/recipes/576696/ (r5)
import
weakref
class
Link
(
object
):
class
Link
(
object
):
# This make that we need to use a different pickle protocol
# This make that we need to use a different pickle protocol
...
@@ -61,6 +62,7 @@ class Link(object):
...
@@ -61,6 +62,7 @@ class Link(object):
if
len
(
state
)
==
3
:
if
len
(
state
)
==
3
:
self
.
key
=
state
[
2
]
self
.
key
=
state
[
2
]
class
OrderedSet
(
MutableSet
):
class
OrderedSet
(
MutableSet
):
'Set the remembers the order elements were added'
'Set the remembers the order elements were added'
# Big-O running times for all methods are the same as for regular sets.
# Big-O running times for all methods are the same as for regular sets.
...
@@ -179,10 +181,10 @@ class OrderedSet(MutableSet):
...
@@ -179,10 +181,10 @@ class OrderedSet(MutableSet):
elif
isinstance
(
other
,
set
):
elif
isinstance
(
other
,
set
):
# Raise exception to avoid confusion.
# Raise exception to avoid confusion.
raise
TypeError
(
raise
TypeError
(
'Cannot compare an `OrderedSet` to a `set` because '
'Cannot compare an `OrderedSet` to a `set` because '
'this comparison cannot be made symmetric: please '
'this comparison cannot be made symmetric: please '
'manually cast your `OrderedSet` into `set` before '
'manually cast your `OrderedSet` into `set` before '
'performing this comparison.'
)
'performing this comparison.'
)
else
:
else
:
return
NotImplemented
return
NotImplemented
...
...
theano/tests/test_flake8.py
浏览文件 @
31c0fd72
...
@@ -184,7 +184,6 @@ whitelist_flake8 = [
...
@@ -184,7 +184,6 @@ whitelist_flake8 = [
"scan_module/scan_opt.py"
,
"scan_module/scan_opt.py"
,
"scan_module/tests/test_scan.py"
,
"scan_module/tests/test_scan.py"
,
"scan_module/tests/test_scan_opt.py"
,
"scan_module/tests/test_scan_opt.py"
,
"misc/ordered_set.py"
,
"misc/strutil.py"
,
"misc/strutil.py"
,
"misc/gnumpy_utils.py"
,
"misc/gnumpy_utils.py"
,
"misc/may_share_memory.py"
,
"misc/may_share_memory.py"
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论