-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[CodeStyle][F401] remove unused import in unittests/test_[f-j] #46697
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
python/paddle/fluid/tests/unittests/test_imperative_data_loader_exit_func.py
Outdated
Show resolved
Hide resolved
@@ -39,7 +39,6 @@ def setUp(self): | |||
|
|||
def func_test_clear_queue_set(self): | |||
test_queue = queue.Queue(self.capacity) | |||
global multiprocess_queue_set |
There was a problem hiding this comment.
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 ,这里直接移除这一行即可
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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