Pylinter в Sublime text 3.1.1 до сих пор не использует Python2.7 - PullRequest
0 голосов
/ 21 ноября 2018

Вот мои настройки 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?

1 Ответ

0 голосов
/ 29 января 2019

Вы пытались настроить "исполняемый файл", как предлагается в документации?http://www.sublimelinter.com/en/stable/linter_settings.html#executable

Фрагмент из моей конфигурации (Windows):

"executable": "C:\\Python27\\Scripts\\pylint.exe"
...