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][F401] remove unused import in unittests/test_[f-j] #46697

Merged
merged 8 commits into from
Oct 11, 2022

Conversation

SigureMo
Copy link
Member

@SigureMo SigureMo commented Oct 1, 2022

PR types

Others

PR changes

Others

Describe

修复 F401 unused import 存量 python 代码

  • python/paddle/fluid/tests/unittests/test_[f-j]
    • python/paddle/fluid/tests/unittests/test_f 开头的文件
    • python/paddle/fluid/tests/unittests/test_g 开头的文件
    • python/paddle/fluid/tests/unittests/test_h 开头的文件
    • python/paddle/fluid/tests/unittests/test_i 开头的文件
    • python/paddle/fluid/tests/unittests/test_j 开头的文件

Related links

@paddle-bot
Copy link

paddle-bot bot commented Oct 1, 2022

你的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-old paddle-bot-old bot added the contributor External developers label Oct 1, 2022
@@ -39,7 +39,6 @@ def setUp(self):

def func_test_clear_queue_set(self):
test_queue = queue.Queue(self.capacity)
global multiprocess_queue_set
Copy link
Member Author

@SigureMo SigureMo Oct 2, 2022

Choose a reason for hiding this comment

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

这里 global 是没必要的,而且会导致 F401(False positive),导致 autoflake 误删上面的 import,该问题见 PyCQA/pyflakes#389 ,这里直接移除这一行即可

@SigureMo SigureMo changed the title [WIP][CodeStyle][F401] remove unused import in unittests/test_[f-j] [CodeStyle][F401] remove unused import in unittests/test_[f-j] Oct 2, 2022
@luotao1 luotao1 self-assigned this Oct 10, 2022
Copy link
Contributor

@luotao1 luotao1 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@raindrops2sea raindrops2sea 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 merged commit 0773639 into PaddlePaddle:develop Oct 11, 2022
@SigureMo SigureMo deleted the F401/fix/unittests-test_f_j branch October 11, 2022 08:51
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.

[F401] python/paddle/fluid/tests/unittests/test_[f-j]
3 participants