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][B016] Cannot raise a literal. Did you intend to return it or raise an Exception? #52118

Merged
merged 1 commit into from
Mar 25, 2023

Conversation

gouzil
Copy link
Member

@gouzil gouzil commented Mar 24, 2023

PR types

Others

PR changes

Others

Describe

明确raise类型

B016: Cannot raise a literal. Did you intend to return it or raise an Exception?

是否可以引入本 rule:✅ 如上所述,可以引入
是否可引入自动修复:❌手动修复

raise "127.0.0.1 in ips is not allowed in multi-nodes."

修改为

raise ValueError("127.0.0.1 in ips is not allowed in multi-nodes.")

Related links

@paddle-bot
Copy link

paddle-bot bot commented Mar 24, 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.

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 closed this Mar 25, 2023
@luotao1 luotao1 reopened this Mar 25, 2023
@luotao1 luotao1 merged commit bf1771d into PaddlePaddle:develop Mar 25, 2023
@gouzil gouzil deleted the codeStyle-b016 branch May 15, 2023 14:31
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