I'm running some Travis builds of a project which includes Python modules, and wanted to manually run the pylint linting tool across my GitHub repo, to compare/contrast what Travis was telling me.
I'm running Ubuntu 20.04.5 LTS so just went ahead and installed via the Aptitude package manager: -
apt-get update && apt-get install -y pylint
which seemed fine.
Then I noticed that the results differed - when I checked Travis, I was using pylint 2.15.2 whereas, on Ubuntu, I was way behind the curve: -
pylint --version
astroid 2.3.3
Python 3.8.10 (default, Jun 22 2022, 20:18:18)
[GCC 9.4.0]
My mistake ? Using Aptitude ...
I uninstalled pylint
apt-get remove -y pylint
and installed it using the Package Installer (for) Python, aka pip
I did notice that the installation location was different: -
- apt-get install ->>> /usr/bin/pylint
- pip ->>> /usr/local/bin/pylint
so had to restart my shell to pick up the new version: -
pylint --version
astroid 2.12.10
Python 3.8.10 (default, Jun 22 2022, 20:18:18)
[GCC 9.4.0]
which is better ( part of my planned change will be to have the Travis job use 2.15.3 as well )
Right, onwards for some linting .....
No comments:
Post a Comment