tasks/pylint.js
function getPythonCode(options) {
    var pythonCode = [],
        internalPylint = !options.externalPylint,
        pylintPath = path.join(__dirname, 'lib'),
        initHook = options.initHook;
    delete options.initHook;

    if (initHook) {
      pythonCode.push(initHook);
    }

    if (internalPylint) {
      pythonCode.push('import sys', 'sys.path.insert(0, r"' + pylintPath + '")');
    }

    pythonCode.push('import pylint', 'pylint.run_pylint()');
    delete options.externalPylint;
    return pythonCode.join('; ');
  }
function getPythonCode(options) {
    var pythonCode = [],
        internalPylint = !options.externalPylint,
        pylintPath = path.join(__dirname, 'lib'),
        initHook = options.initHook;
    delete options.initHook;

    if (initHook) {
      pythonCode.push(initHook);
    }

    if (internalPylint) {
      pythonCode.push('import sys', 'sys.path.insert(0, r"' + pylintPath + '")');
    }

    pythonCode.push('import pylint', 'pylint.run_pylint()');
    delete options.externalPylint;
    return pythonCode.join('; ');
  }
function getPythonCode ( options ) { var pythonCode = [ ] , internalPylint = ! options . externalPylint , pylintPath = path . join ( __dirname , 'lib' ) , initHook = options . initHook ; delete options . initHook ; if ( initHook ) { pythonCode . push ( initHook ) ; } if ( internalPylint ) { pythonCode . push ( 'import sys' , 'sys.path.insert(0, r"' + pylintPath + '")' ) ; } pythonCode . push ( 'import pylint' , 'pylint.run_pylint()' ) ; delete options . externalPylint ; return pythonCode . join ( '; ' ) ; }
Get the python code that will import and execute pylint Uses the options.externalPylint parameter to determine whether to use the pylint included with the plugin or an external one. externalPylint is deleted from the options object.
Get the python code that will import and execute pylint Uses the options . externalPylint parameter to determine whether to use the pylint included with the plugin or an external one . externalPylint is deleted from the options object .