我目前正在为一个很酷的小python项目nameyPhotoCollage做贡献,维护者请求贡献者在考虑pull请求之前通过flake8
检查(足够公平)。在
我的问题是我不能通过这些支票:在我的电脑上,没有抱怨。但在特拉维斯,我总是get the following errors:
$ flake8 .
./photocollage/gtkgui.py:29:1: I202 Additional newline in a section of imports.
./photocollage/gtkgui.py:32:1: I202 Additional newline in a section of imports.
./photocollage/render.py:25:1: I202 Additional newline in a section of imports.
The command "flake8 ." exited with 1.
但是,我的代码如下所示:
我没有更改进口商品。以前的提交,所以我怀疑flake8-import-order
发生了某种变化。有什么想法吗?在
在你的计算机上获取这些错误
请尝试使用
flake8
和flake8-import-order
的最新版本:另外,既然这是python3项目,那么您是否正在用python3运行
^{pr2}$flake8
?根据您的操作系统,要运行的命令可以是:或者
关于这些新错误
你说得对:
flake8-import-order
最近似乎发生了变化,现在检测出假阳性。这是由于gi.repository
设置导入版本的奇怪方式(gi.require_version()
必须在导入之间调用)。在我想除了禁用这些特定行上的
flake8
规则之外,您没有什么可以做的:相关问题 更多 >
编程相关推荐