Skip to content

[Deprecated][CodeStyle][F401] use autoflake remove unused imports - #45252

Closed
SigureMo wants to merge 1 commit into
PaddlePaddle:developfrom
cattidea:flake8-unused-import
Closed

SigureMo wants to merge 1 commit into
PaddlePaddle:developfrom
cattidea:flake8-unused-import

Conversation

@SigureMo

Copy link
Copy Markdown
Collaborator

PR types

Others

PR changes

Others

Describe

pip install autoflake
autoflake --in-place --remove-all-unused-imports --exclude=__init__.py ./**/*.py

@paddle-bot

paddle-bot Bot commented Aug 18, 2022

Copy link
Copy Markdown

你的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 commented Aug 18, 2022

Copy link
Copy Markdown

很抱歉,经过我们的反复讨论,你的PR暂未达到合入标准,请阅读飞桨原生算子开发规范,你可以重新提交新的PR,我们先将此PR关闭,感谢你的贡献。
Sorry to inform you that through our discussion, your PR fails to meet the merging standard (Reference: Paddle Custom Operator Design Doc). You can also submit an new one. Thank you.

print(embedding.weight.gradient())

"""
pass

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

image

日志中报的这个错,不太清楚是哪个python文件删多了,只能建议分目录来。

  • 可以先改test目录下的
  • 有些修改可能会有问题,比如framework.py中直接把pass删了。
  • 修改内容较多,分目录修改可以检查到每个文件

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

嗯嗯,直接全部修改比较难定位和修复问题,所以目前的计划是分目录修改

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

和 @SigureMo 讨论,分目录/文件修改可以从简单、不易出错的目录/文件开始,如

  • 从没有被 import 或者很少被 import 的单测文件
  • tools目录

后面逐渐向比较核心的模块修改。

@SigureMo SigureMo changed the title [WIP][CodeStyle] use autoflake remove unused imports [WIP][CodeStyle][F401] use autoflake remove unused imports Sep 18, 2022
@SigureMo SigureMo changed the title [WIP][CodeStyle][F401] use autoflake remove unused imports [Deprecated][CodeStyle][F401] use autoflake remove unused imports Sep 28, 2022
@SigureMo SigureMo closed this Sep 28, 2022
@SigureMo
SigureMo deleted the flake8-unused-import branch September 28, 2022 14:20
@paddle-bot

paddle-bot Bot commented Sep 28, 2022

Copy link
Copy Markdown

很抱歉,经过我们的反复讨论,你的PR暂未达到合入标准,请阅读飞桨原生算子开发规范,你可以重新提交新的PR,我们先将此PR关闭,感谢你的贡献。
Sorry to inform you that through our discussion, your PR fails to meet the merging standard (Reference: Paddle Custom Operator Design Doc). You can also submit an new one. Thank you.

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.

2 participants