[CodeStyle][UP010] remove future imports and use ruff to replace ci checks #51772
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
Describe
移除 #46411 后出现的增量,#46466 虽然已经拦截了但貌似部分漏掉了,本 PR 利用 Ruff UP010 rule 进行存量修复 + 增量拦截,因此可以移除 #46466 增加的相关检测
future 详细说明见:https://docs.python.org/3/library/__future__.html
target-version
选项可控制最低支持版本,目前选项 3.7 与 Paddle 一致,因此移除的 future imports 都是已经内置的特性,该 rules 的自动修复可放心引入修复所使用的命令如下:
Related links
introducing ruff
community#412