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][PLR1722] replace exit() with sys.exit() #52151

Merged
merged 4 commits into from
Mar 29, 2023

Conversation

KimBioInfoStudio
Copy link
Contributor

@KimBioInfoStudio KimBioInfoStudio commented Mar 25, 2023

PR types

Others

PR changes

Others

Describe

https://pylint.readthedocs.io/en/latest/user_guide/messages/refactor/consider-using-sys-exit.html

exit() 替换为 sys.exit()
exit()sys.exit() 区别: https://stackoverflow.com/questions/6501121/difference-between-exit-and-sys-exit-in-python
#51729 57
是否可以引入本 rule:Penidng on ci results 可引入。
是否可引入自动修复:部分 可引入

@paddle-bot
Copy link

paddle-bot bot commented Mar 25, 2023

你的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.

@paddle-bot paddle-bot bot added contributor External developers status: proposed labels Mar 25, 2023
@paddle-bot
Copy link

paddle-bot bot commented Mar 25, 2023

❌ The PR is not created using PR's template. You can refer to this Demo.
Please use PR's template, it helps save our maintainers' time so that more developers get helped.

@SigureMo
Copy link
Member

SigureMo commented Mar 25, 2023

是否可引入自动修复:部分 可引入

这里「部分 可引入」是什么意思,是说自动修复只能修复一部分吗?

另外在描述里说明一下这里为什么不建议使用 exit 而建议使用 sys.exit 吧,两者的区别是什么

❌ The PR is not created using PR's template. You can refer to this #24877.

两个 PR 都没能通过 CheckPRTemplate,需要修改一下

@KimBioInfoStudio KimBioInfoStudio changed the title fix PLR1722 [CodeStyle][PLR1722] consider-using-sys-exit Mar 26, 2023
tools/get_pr_ut.py Outdated Show resolved Hide resolved
@SigureMo SigureMo changed the title [CodeStyle][PLR1722] consider-using-sys-exit [CodeStyle][PLR1722] replace exit() with sys.exit() Mar 26, 2023
@SigureMo
Copy link
Member

需要解决下冲突

@KimBioInfoStudio
Copy link
Contributor Author

KimBioInfoStudio commented Mar 28, 2023

需要解决下冲突

conflicts with another thread for mv test cases, will rebase after it, save ci machine resources @SigureMo @luotao1

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.

已确定所有未加 import sys 的文件本身就已经 import 过了

解决冲突后 LGTM

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

@SigureMo
Copy link
Member

怎么我 LGTM 的瞬间直接挂了一堆 CI……麻烦 re-run 下 PR-CI-Py3

@luotao1 luotao1 merged commit c207944 into PaddlePaddle:develop Mar 29, 2023
@KimBioInfoStudio KimBioInfoStudio deleted the kim/fix_PLR1722 branch March 29, 2023 02:35
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.

3 participants