0
对于libnotify我使用下面的代码导入在文件的顶部,GI
import gi
gi.require_version('Notify', '0.7')
from gi.repository import Notify
然后flake8
抱怨说:
E402 module level import not at top of file
在另一方面,人们必须在指定版本使用gi:http://mednis.info/use-girequire_versiongtk-30-before-import.html
我该怎么办?忽略linter的消息或删除gi.require_version
行?