Repository navigation
[CodeStyle][task 2] enable Ruff F401 rule in python/paddle/base - #57388
Merged
Merged
Conversation
|
你的PR提交成功,感谢你对开源项目的贡献! |
zrr1999
force-pushed
the
F401
branch
2 times, most recently
from
September 16, 2023 07:48
f984d74 to
892b11d
Compare
SigureMo
reviewed
Sep 16, 2023
Comment on lines
26
to
41
| from .trainer_desc import ( | ||
| MultiTrainer, | ||
| DistMultiTrainer, | ||
| PipelineTrainer, | ||
| HeterXpuTrainer, | ||
| PSGPUTrainer, | ||
| HeterPipelineTrainer, | ||
| MultiTrainer, # noqa: F401 | ||
| DistMultiTrainer, # noqa: F401 | ||
| PipelineTrainer, # noqa: F401 | ||
| HeterXpuTrainer, # noqa: F401 | ||
| PSGPUTrainer, # noqa: F401 | ||
| HeterPipelineTrainer, # noqa: F401 | ||
| ) | ||
| from .device_worker import ( | ||
| Hogwild, | ||
| DownpourSGD, | ||
| DownpourLite, | ||
| Section, | ||
| DownpourSGDOPT, | ||
| HeterSection, | ||
| Hogwild, # noqa: F401 | ||
| DownpourSGD, # noqa: F401 | ||
| DownpourLite, # noqa: F401 | ||
| Section, # noqa: F401 | ||
| DownpourSGDOPT, # noqa: F401 | ||
| HeterSection, # noqa: F401 | ||
| ) |
Collaborator
SigureMo
reviewed
Sep 16, 2023
| # Ignore unused imports in __init__.py | ||
| # Ignore unused imports in some files | ||
| "__init__.py" = ["F401"] | ||
| "python/paddle/base/core.py" = ["F401"] |
Collaborator
There was a problem hiding this comment.
不建议整个文件 ignore 掉,那个文件的 logging 明显是没有用的
可以参考上一条,将 libpaddle 的 import 改写为
from .libpaddle import ( # noqa: F401
xxx,
yyy,
zzz,
)这样就只需要加一个 noqa 了
Collaborator
SigureMo
reviewed
Sep 17, 2023
| 'device_guard', | ||
| 'set_flags', | ||
| 'get_flags', | ||
| 'data_feed_pb2', |
Collaborator
There was a problem hiding this comment.
这个直接 noqa 就行,加到 __all__ 会认为是公开 API 的
|
|
||
| [tool.ruff.per-file-ignores] | ||
| # Ignore unused imports in __init__.py | ||
| # Ignore unused imports in some files |
python/paddle/base
Frida-a
pushed a commit
to Frida-a/Paddle
that referenced
this pull request
Oct 14, 2023
danleifeng
pushed a commit
to danleifeng/Paddle
that referenced
this pull request
Nov 14, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



PR types
Others
PR changes
Others
Description
enable Ruff F401 rule in python/paddle/base
paddle.basecheck #57367