I'm using Sublime Text 3 With Pylinter to run pylint
on my files.
However, on the same machine, I work on files for both python 2, and python 3 projects (the code is executed on one of several remote test-VMs, via SSH. I'm modifying the files by opening them over SMB. This is my home test-lab, and I'm finally sitting down to learn py3k).
Can I easily override the mechanism pylint uses to determine the python version it should lint for? Ideally, there would be an inline directive, but I have not had much luck finding anything.
I'm (editing) on Windows (the remote VMs are linux, but that' irrelevant here), for what it's worth.
First, to check the version of Pylint you're running, run the following command: pylint --version.
Pylint is a static code analyser for Python 2 or 3. The latest version supports Python 3.7.
Pylint analyses your code without actually running it. It checks for errors, enforces a coding standard, looks for code smells, and can make suggestions about how the code could be refactored. Pylint can infer actual values from your code using its internal code representation (astroid).
You can try python2 -m pylint ...
and python3 -m pylint ...
. That ensures that you use the right version.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With