Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
3a764edd
提交
3a764edd
authored
3月 02, 2022
作者:
Brandon T. Willard
提交者:
Brandon T. Willard
3月 02, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix typing issues in aesara.graph.type
上级
6aa7541a
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
9 行增加
和
7 行删除
+9
-7
type.py
aesara/graph/type.py
+1
-1
utils.py
aesara/graph/utils.py
+8
-2
setup.cfg
setup.cfg
+0
-4
没有找到文件。
aesara/graph/type.py
浏览文件 @
3a764edd
...
@@ -223,7 +223,7 @@ class Type(MetaObject):
...
@@ -223,7 +223,7 @@ class Type(MetaObject):
return
utils
.
add_tag_trace
(
self
.
make_variable
(
name
))
return
utils
.
add_tag_trace
(
self
.
make_variable
(
name
))
@classmethod
@classmethod
def
values_eq
(
cls
,
a
:
Any
,
b
:
Any
)
->
bool
:
def
values_eq
(
cls
,
a
:
"Type"
,
b
:
"Type"
)
->
bool
:
"""Return ``True`` if `a` and `b` can be considered exactly equal.
"""Return ``True`` if `a` and `b` can be considered exactly equal.
`a` and `b` are assumed to be valid values of this `Type`.
`a` and `b` are assumed to be valid values of this `Type`.
...
...
aesara/graph/utils.py
浏览文件 @
3a764edd
...
@@ -3,7 +3,13 @@ import sys
...
@@ -3,7 +3,13 @@ import sys
import
traceback
import
traceback
from
abc
import
ABCMeta
from
abc
import
ABCMeta
from
io
import
StringIO
from
io
import
StringIO
from
typing
import
List
,
Optional
,
Sequence
,
Tuple
from
typing
import
TYPE_CHECKING
,
List
,
Optional
,
Sequence
,
Tuple
,
TypeVar
,
Union
if
TYPE_CHECKING
:
from
aesara.graph.basic
import
Apply
,
Variable
T
=
TypeVar
(
"T"
,
bound
=
Union
[
"Apply"
,
"Variable"
])
def
simple_extract_stack
(
def
simple_extract_stack
(
...
@@ -67,7 +73,7 @@ def simple_extract_stack(
...
@@ -67,7 +73,7 @@ def simple_extract_stack(
return
trace
return
trace
def
add_tag_trace
(
thing
,
user_line
:
Optional
[
int
]
=
None
)
:
def
add_tag_trace
(
thing
:
T
,
user_line
:
Optional
[
int
]
=
None
)
->
T
:
"""Add tag.trace to a node or variable.
"""Add tag.trace to a node or variable.
The argument is returned after being affected (inplace).
The argument is returned after being affected (inplace).
...
...
setup.cfg
浏览文件 @
3a764edd
...
@@ -123,10 +123,6 @@ check_untyped_defs = False
...
@@ -123,10 +123,6 @@ check_untyped_defs = False
ignore_errors = True
ignore_errors = True
check_untyped_defs = False
check_untyped_defs = False
[mypy-aesara.graph.type]
ignore_errors = True
check_untyped_defs = False
[mypy-aesara.graph.optdb]
[mypy-aesara.graph.optdb]
ignore_errors = True
ignore_errors = True
check_untyped_defs = False
check_untyped_defs = False
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论