Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
d88f3f9e
提交
d88f3f9e
authored
11月 20, 2022
作者:
Michael Osthege
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Upgrade to mypy v0.991 and fix mypy errors
上级
5aa17801
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
26 行增加
和
25 行删除
+26
-25
.pre-commit-config.yaml
.pre-commit-config.yaml
+1
-1
cmodule.py
aesara/link/c/cmodule.py
+23
-22
vm.py
aesara/link/vm.py
+1
-1
op.py
aesara/scan/op.py
+1
-1
没有找到文件。
.pre-commit-config.yaml
浏览文件 @
d88f3f9e
...
...
@@ -47,7 +47,7 @@ repos:
)$
args
:
[
'
--in-place'
,
'
--remove-all-unused-imports'
,
'
--remove-unused-variable'
]
-
repo
:
https://github.com/pre-commit/mirrors-mypy
rev
:
v0.9
82
rev
:
v0.9
91
hooks
:
-
id
:
mypy
additional_dependencies
:
...
...
aesara/link/c/cmodule.py
浏览文件 @
d88f3f9e
...
...
@@ -2440,28 +2440,29 @@ class GCC_compiler(Compiler):
def
linking_patch
(
lib_dirs
:
List
[
str
],
libs
:
List
[
str
])
->
List
[
str
]:
if
sys
.
platform
!=
"win32"
:
return
[
f
"-l{l}"
for
l
in
libs
]
def
sort_key
(
lib
):
# type: ignore
name
,
*
numbers
,
extension
=
lib
.
split
(
"."
)
return
(
extension
==
"dll"
,
tuple
(
map
(
int
,
numbers
)))
patched_lib_ldflags
=
[]
for
lib
in
libs
:
ldflag
=
f
"-l{lib}"
for
lib_dir
in
lib_dirs
:
lib_dir
=
lib_dir
.
strip
(
'"'
)
windows_styled_libs
=
[
fname
for
fname
in
os
.
listdir
(
lib_dir
)
if
not
(
os
.
path
.
isdir
(
os
.
path
.
join
(
lib_dir
,
fname
)))
and
fname
.
split
(
"."
)[
0
]
==
lib
and
fname
.
split
(
"."
)[
-
1
]
in
[
"dll"
,
"lib"
]
]
if
windows_styled_libs
:
selected_lib
=
sorted
(
windows_styled_libs
,
key
=
sort_key
)[
-
1
]
ldflag
=
f
'"{os.path.join(lib_dir, selected_lib)}"'
patched_lib_ldflags
.
append
(
ldflag
)
return
patched_lib_ldflags
else
:
# In explicit else because of https://github.com/python/mypy/issues/10773
def
sort_key
(
lib
):
name
,
*
numbers
,
extension
=
lib
.
split
(
"."
)
return
(
extension
==
"dll"
,
tuple
(
map
(
int
,
numbers
)))
patched_lib_ldflags
=
[]
for
lib
in
libs
:
ldflag
=
f
"-l{lib}"
for
lib_dir
in
lib_dirs
:
lib_dir
=
lib_dir
.
strip
(
'"'
)
windows_styled_libs
=
[
fname
for
fname
in
os
.
listdir
(
lib_dir
)
if
not
(
os
.
path
.
isdir
(
os
.
path
.
join
(
lib_dir
,
fname
)))
and
fname
.
split
(
"."
)[
0
]
==
lib
and
fname
.
split
(
"."
)[
-
1
]
in
[
"dll"
,
"lib"
]
]
if
windows_styled_libs
:
selected_lib
=
sorted
(
windows_styled_libs
,
key
=
sort_key
)[
-
1
]
ldflag
=
f
'"{os.path.join(lib_dir, selected_lib)}"'
patched_lib_ldflags
.
append
(
ldflag
)
return
patched_lib_ldflags
@staticmethod
def
compile_str
(
...
...
aesara/link/vm.py
浏览文件 @
d88f3f9e
...
...
@@ -1056,7 +1056,7 @@ class VMLinker(LocalLinker):
callback
=
self
.
callback
,
callback_input
=
self
.
callback_input
,
)
elif
self
.
use_cloop
and
CVM
:
elif
self
.
use_cloop
and
CVM
is
not
None
:
# create a map from nodes to ints and vars to ints
nodes_idx
=
{}
...
...
aesara/scan/op.py
浏览文件 @
d88f3f9e
...
...
@@ -3449,7 +3449,7 @@ def profile_printer(
@op_debug_information.register
(
Scan
)
# type: ignore[has-type]
def
_op_debug_information_Scan
(
op
,
node
):
def
_op_debug_information_Scan
(
op
:
Scan
,
node
:
Apply
):
from
typing
import
Sequence
from
aesara.scan.utils
import
ScanArgs
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论