以下是我的pylinter设置:
{
// When versbose is 'true', various messages will be written to the console.
// values: true or false
"verbose": false,
// The full path to the Python executable you want to
// run Pylint with or simply use 'python'.
"python_bin": "/usr/bin/python2.7",
// The following paths will be added Pylint's Python path
"python_path": [],
// Optionally set the working directory
"working_dir": null,
// Full path to the lint.py module in the pylint package
"pylint_path": null,
// Optional full path to a Pylint configuration file
"pylint_rc": null,
// Set to true to automtically run Pylint on save
"run_on_save": true,
// Set to true to use graphical error icons
"use_icons": false,
"disable_outline": false,
// Status messages stay as long as cursor is on an error line
"message_stay": false,
// Ignore Pylint error types. Possible values:
// "R" : Refactor for a "good practice" metric violation
// "C" : Convention for coding standard violation
// "W" : Warning for stylistic problems, or minor programming issues
// "E" : Error for important programming issues (i.e. most probably bug)
// "F" : Fatal for errors which prevented further processing
"ignore": [],
// a list of strings of individual errors to disable, ex: ["C0301"]
"disable": [],
"plugins": []
}
我显然已经将python2.7可执行文件放在了正确的位置(我认为)。这是which python2.7
给我的路径。然而,像print "test"
这样的语句仍然返回E0001 Missing parentheses in call to print
-这是一个典型的python3 vs 2错误。
如何让它检查python2.7错误?
发布于 2019-01-30 04:43:04
您是否尝试过按照文档中的建议设置“可执行文件”?http://www.sublimelinter.com/en/stable/linter_settings.html#executable
我的配置中的代码片段(Windows):
"executable": "C:\\Python27\\Scripts\\pylint.exe"
https://stackoverflow.com/questions/53415317
复制相似问题