Extracting Pylint Score
<p>Does anyone know how to extract <em>only</em> the pylint score for a repository?</p>

<p>So, assuming pylint produces the following output:</p>

<pre><code>Global evaluation
-----------------
Your code has been rated at 6.67/10 (previous run: 6.67/10, +0.00)
</code></pre>

<p>I would like it to return a value of 6.67.</p>

<p>Thanks,</p>

<p>SeÃ¡n</p>

<p>You can run <code>pylint</code> <em>programmatically</em> and get to the <code>stats</code> dictionary of the underlying "linter":</p>

<pre><code>from pylint.lint import Run

results = Run(['test.py'], exit=False)
print(results.linter.stats['global_note'])
</code></pre>

python pylint