【发布时间】:2018-03-15 14:45:41
【问题描述】:
我有这个代码:
import pyqtgraph as pg # Short name cause pyqtgraph is looong
import pyqtgraph.exporters
# ... some code
pg.foo()
pg.exporters.ExportItem(blah)
现在 pylint 抱怨 import pyqtgraph.exporters 说它是未使用的导入。解决此警告的 Pythonic 或优雅的解决方案是什么?
请注意,如果没有import pyqtgraph.exporters,则无法调用该子模块中的方法。
【问题讨论】: