Skip to content

[CodeStyle][F401] remove unused imports in unittests/r_cmake_paddle_tools. - #46712

Merged
luotao1 merged 4 commits into
PaddlePaddle:developfrom
cattidea:F401/fix/r_cmake_paddle_tools
Oct 12, 2022
Merged

luotao1 merged 4 commits into
PaddlePaddle:developfrom
cattidea:F401/fix/r_cmake_paddle_tools

Conversation

@Yulv-git

@Yulv-git Yulv-git commented Oct 2, 2022 •

Copy link
Copy Markdown
Contributor

PR types

Others

PR changes

Others

Describe

修复 r/、 cmake/、 paddle、 tools/ 目录 F401 unused import 存量 python 代码

autoflake --in-place --remove-all-unused-imports --ignore-pass-after-docstring --exclude=__init__.py --recursive ./r/
autoflake --in-place --remove-all-unused-imports --ignore-pass-after-docstring --exclude=__init__.py --recursive ./cmake/
autoflake --in-place --remove-all-unused-imports --ignore-pass-after-docstring --exclude=__init__.py --recursive ./paddle/
autoflake --in-place --remove-all-unused-imports --ignore-pass-after-docstring --exclude=__init__.py --recursive ./tools/

Related links

…ools.

Signed-off-by: Yulv-git <yulvchi@qq.com>
@paddle-bot

paddle-bot Bot commented Oct 2, 2022

Copy link
Copy Markdown

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册。
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

Signed-off-by: Yulv-git <yulvchi@qq.com>

@SigureMo SigureMo left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Static Check 流水线挂了,说是 API 有 diff,而且看起来是只有 - API 没有 + API,估计是某个 tools 下的脚本出现了问题,需要定位一下并修复

猜测是 tools/sampcd_processor.py(该脚本貌似会向 API_DEV.spec 写 API 的签名等信息)

Comment thread tools/test_print_signatures.py Resolved
@Yulv-git

Yulv-git commented Oct 3, 2022

Copy link
Copy Markdown
Contributor Author
image

Static Check 流水线挂了,说是 API 有 diff,而且看起来是只有 - API 没有 + API,估计是某个 tools 下的脚本出现了问题,需要定位一下并修复

猜测是 tools/sampcd_processor.py(该脚本貌似会向 API_DEV.spec 写 API 的签名等信息)

是自动修改时误删了 tools/print_signatures.py 需用到 paddle 导入,而该脚本的 paddle 采用的是多处函数内部的局部导入。在该脚本中增加 paddle 的全局导入,并删除其他多余的局部导入即可。

@SigureMo SigureMo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM~~~

@luotao1 luotao1 self-assigned this Oct 10, 2022
@luotao1
luotao1 requested a review from raindrops2sea October 10, 2022 10:17

@raindrops2sea raindrops2sea left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@luotao1
luotao1 merged commit 5f25183 into PaddlePaddle:develop Oct 12, 2022
@SigureMo
SigureMo deleted the F401/fix/r_cmake_paddle_tools branch October 12, 2022 03:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor External developers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[F401] tools/ [F401] paddle/ [F401] r/ + cmake/

4 participants