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][task 11] enable Ruff F403 rule in python/paddle/base/__init__.py #57501

Merged
merged 13 commits into from
Sep 21, 2023

Conversation

ooooo-create
Copy link
Contributor

@ooooo-create ooooo-create commented Sep 19, 2023

PR types

Others

PR changes

Others

Description

enable Ruff F403 rule in python/paddle/base/init.py
@gouzil

@paddle-bot
Copy link

paddle-bot bot commented Sep 19, 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 the contributor External developers label Sep 19, 2023
@luotao1 luotao1 added the HappyOpenSource 快乐开源活动issue与PR label Sep 20, 2023
@luotao1
Copy link
Contributor

luotao1 commented Sep 20, 2023

需要解决冲突

@ooooo-create
Copy link
Contributor Author

需要解决冲突

Done

@SigureMo
Copy link
Member

优先考虑将 from a import * 改写为 from a import b, c, d,直接删除只是一个特例而已,而不是说如果不能直接删就直接 noqa,可以优先看看有哪些 symbol 是需要的,只 re-export 这部分 symbol 即可

pyproject.toml Outdated
"UP030",
"F522",
"F403",
"UP030",
Copy link
Member

Choose a reason for hiding this comment

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

还有这里是解决冲突又出问题了么

Copy link
Contributor Author

@ooooo-create ooooo-create Sep 20, 2023

Choose a reason for hiding this comment

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

image
确实是存在UP030,没有问题,但是不清楚为什么怎么显示

@ooooo-create
Copy link
Contributor Author

优先考虑将 from a import * 改写为 from a import b, c, d,直接删除只是一个特例而已,而不是说如果不能直接删就直接 noqa,可以优先看看有哪些 symbol 是需要的,只 re-export 这部分 symbol 即可

只要考虑 __all__里面的symbol吧?

@SigureMo
Copy link
Member

只要考虑 __all__里面的symbol吧?

嗯,但 paddle 嵌套了很多的 import *,有时候就不太好定位哪些 symbol 是需要的了

@SigureMo SigureMo closed this Sep 20, 2023
@SigureMo SigureMo reopened this Sep 20, 2023
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.

这个 PR 整体 ok 了,不过 99% 和 #57413 会有冲突,那边冲突频率更高所以那边先合下,就委屈 o 师傅明天再解决下冲突了(可以记一下现在各个 import * 都改了什么,到时候 merge 后直接改即可)

另外这个 PR 是解决了全部 F403 么,是的话另一个 PR 是不是可以 close 了?

@SigureMo SigureMo changed the title [CodeStyle][task 11] enable Ruff F403 rule in python/paddle/base/__init__.py [CodeStyle][task 11] enable Ruff F403 rule in python/paddle/base/__init__.py Sep 20, 2023
@ooooo-create
Copy link
Contributor Author

@SigureMo

这个 PR 整体 ok 了,不过 99% 和 #57413 会有冲突,那边冲突频率更高所以那边先合下,就委屈 o 师傅明天再解决下冲突了(可以记一下现在各个 import * 都改了什么,到时候 merge 后直接改即可)

另外这个 PR 是解决了全部 F403 么,是的话另一个 PR 是不是可以 close 了?

好的~~,现在关了

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.

LGTMeow 🐾

@luotao1 luotao1 merged commit 6e91431 into PaddlePaddle:develop Sep 21, 2023
27 checks passed
iosmers pushed a commit to iosmers/Paddle that referenced this pull request Sep 21, 2023
@ooooo-create ooooo-create deleted the ooooo/F403_3 branch September 23, 2023 05:24
Frida-a pushed a commit to Frida-a/Paddle that referenced this pull request Oct 14, 2023
jiahy0825 pushed a commit to jiahy0825/Paddle that referenced this pull request Oct 16, 2023
danleifeng pushed a commit to danleifeng/Paddle that referenced this pull request Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers HappyOpenSource 快乐开源活动issue与PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants