pylint--info from google
来源:互联网 发布:怎么查询网络延迟 编辑:程序博客网 时间:2024/05/16 08:39
pylint
over your code.Definition:pylint is a tool for finding bugs and style problems in Python source code. It finds problems that are typically caught by a compiler for less dynamic languages like C and C++. Because of the dynamic nature of Python, some warnings may be incorrect; however, spurious warnings should be fairly infrequent.
Pros:Catches easy-to-miss errors like typos, using-vars-before-assignment, etc.
Cons:pylint
isn't perfect. To take advantage of it, we'll need to sometimes: a) Write around it b) Suppress its warnings or c) Improve it.
Decision:Make sure you run pylint
on your code. Suppress warnings if they are inappropriate so that other issues are not hidden.
To suppress warnings, you can set a line-level comment:
dict = 'something awful' # Bad Idea... pylint: disable=redefined-builtin
pylint warnings are each identified by a alphanumeric code (C0112
) and a symbolic name (empty-docstring
). Prefer the symbolic names in new code or when updating existing code.
If the reason for the suppression is not clear from the symbolic name, add an explanation.
Suppressing in this way has the advantage that we can easily search for suppressions and revisit them.
You can get a list of pylint warnings by doing pylint --list-msgs
. To get more information on a particular message, use pylint --help-msg=C6409
.
Prefer pylint: disable
to the deprecated older form pylint: disable-msg
.
Unused argument warnings can be suppressed by using `_' as the identifier for the unused argument or prefixing the argument name with `unused_'. In situations where changing the argument names is infeasible, you can mention them at the beginning of the function. For example:
def foo(a, unused_b, unused_c, d=None, e=None): _ = d, e return a
- pylint--info from google
- pylint
- My Google Docs Info
- Google Map Api v3 自定义info插件 js-info-bubble
- Get All IE Info from win32 api
- parse required info from string by strsep()
- 【原创】remove some info from pspcidtable WIN7X64
- Pylint学习
- Invitation from Google Wave
- redfire from google
- from weibo :Google CNN
- info
- info
- Info
- info
- info
- Info
- info
- IOS管理文件和目录(NSFileManager用法)
- Java内存分配、管理小结
- javascript简介
- 黑马程序员--单例设计模式
- mac上终端起动MySQL的方法
- pylint--info from google
- Softmax算法:逻辑回归的扩展
- 最少拦截系统
- 求好友
- java自带MD5加密
- Linux如何设置自启动程序
- Oracle Related URLs (Keep Updating)
- ERP行业推荐参考书籍
- vc++调用webservice