Unused import statement 'import requests' in PyChram [closed]

你。 提交于 2021-02-05 12:32:30

问题


I wrote: import requests - in my code without adding anything else, and this line is highlighted in gray.
PyCharm itself offered me to delete the line, but I need it.
Saw a way with adding: #noinspection Py Unresolved References - but is it possible somehow without it?
screenshot of gray line


回答1:


If you aren't using any functions of the requests module PyCharm will show you a warning or error, because you load it in your memory and you don't need it, but if you are working with it later, you can just ignore it.



来源:https://stackoverflow.com/questions/64838032/unused-import-statement-import-requests-in-pychram

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!