Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 4 commits into from
Oct 12, 2022

Conversation

Yulv-git
Copy link
Contributor

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

PR types

Others

PR changes

Others

Describe

修复 r/cmake/paddletools/ 目录 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
Copy link

paddle-bot bot commented Oct 2, 2022

你的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>
Copy link
Member

@SigureMo SigureMo left a comment

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 的签名等信息)

tools/test_print_signatures.py Outdated Show resolved Hide resolved
@Yulv-git
Copy link
Contributor Author

Yulv-git commented Oct 3, 2022

image

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

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

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

Copy link
Member

@SigureMo SigureMo left a comment

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
Copy link
Collaborator

@raindrops2sea raindrops2sea left a comment

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