概述
Flake8 is a wrapper around these tools:PyFlakes
pep8
Ned Batchelder’s McCabe script
PyFlakes是您可能希望检测到此类错误的部分。但它检测到的很少,它解释了为什么:Pyflakes is also faster than Pylint or Pychecker. This is largely because Pyflakes only examines the syntax tree of each file individually. As a consequence, Pyflakes is more limited in the types of things it can check.
flake8文档列出了Pyflakes提供的错误代码:code sample message
F401 module imported but unused
F402 import module from line N shadowed by loop variable
F403 ‘from module import *’ used; unable to detect undefined names
F404 future import(s) name after other statements
F811 redefinition of unused name from line N
F812 list comprehension redefines name from line N
F821 undefined name name
F822 undefined name name in __all__
F823 local variable name ... referenced before assignment
F831 duplicate argument name in function definition
F841 local variable name is assigned to but never used
我先推荐PyCharm,然后是PyLint。在
最后
以上就是坚定网络为你收集整理的无忧考吧python编译环境不存在_python:flake8找不到不存在的方法的全部内容,希望文章能够帮你解决无忧考吧python编译环境不存在_python:flake8找不到不存在的方法所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复