https://aznot.com/index.php?title=Python/pylint&feed=atom&action=history
Python/pylint - Revision history
2024-03-28T13:53:10Z
Revision history for this page on the wiki
MediaWiki 1.41.0
https://aznot.com/index.php?title=Python/pylint&diff=5780&oldid=prev
Kenneth at 20:47, 10 December 2020
2020-12-10T20:47:55Z
<p></p>
<p><b>New page</b></p><div>== pylint ==<br />
<br />
pylint - http://pypi.python.org/pypi/pylint<br />
<br />
Install:<br />
pip install pylint<br />
<br />
manual install:<br />
mkdir -p ~/.src ; cd ~/.src<br />
wget https://pypi.python.org/packages/source/p/pylint/pylint-0.27.0.tar.gz --no-check-certificate<br />
tar -zvxf pylint-0.27.0.tar.gz<br />
cd pylint-0.27.0<br />
sudo python setup.py install # not this appears to install the dependencies as well!<br />
<br />
Usage:<br />
pylint myscript.py<br />
<br />
To get only the messages, and not the report:<br />
pylint -rn myscript.py<br />
<br />
== Max Line Length ==<br />
<br />
.pylintrc (in your source code)<br />
<pre><br />
[FORMAT]<br />
max-line-length=240<br />
</pre><br />
<br />
ref: [https://stackoverflow.com/questions/30667612/pylint-overriding-max-line-length-in-individual-file]<br />
<br />
== Unnecessary parens after %r keyword ==<br />
<br />
print('Hello')<br />
<br />
add this to your imports:<br />
from __future__ import print_function<br />
<br />
ref: [https://stackoverflow.com/questions/28694380/pylint-says-unnecessary-parens-after-r-keyword]</div>
Kenneth