README for Pylint - https://pylint.pycqa.org/
Professional support for pylint is available as part of the Tidelift Subscription. Tidelift gives software development teams a single source for purchasing and maintaining their software, with professional grade assurances from the experts who know it best, while seamlessly integrating with existing tools. |
It's not just a linter that annoys you!
Pylint is a Python static code analysis tool which looks for programming errors, helps enforcing a coding standard, sniffs for code smells and offers simple refactoring suggestions.
It's highly configurable, having special pragmas to control its errors and warnings from within your code, as well as from an extensive configuration file. It is also possible to write your own plugins for adding your own checks or for extending pylint in one way or another.
It's a free software distributed under the GNU General Public Licence unless otherwise specified.
Development is hosted on GitHub: https://github.com/PyCQA/pylint/
You can use the [email protected] mailing list to discuss about Pylint. Subscribe at https://mail.python.org/mailman/listinfo/code-quality/ or read the archives at https://mail.python.org/pipermail/code-quality/
Pull requests are amazing and most welcome.
Pylint can be simply installed by running:
pip install pylint
If you are using Python 3.7.2 , upgrade to get full support for your version:
pip install pylint --upgrade
If you want to install from a source distribution, extract the tarball and run the following command
python setup.py install
Do make sure to do the same for astroid, which is used internally by pylint.
For debian and rpm packages, use your usual tools according to your Linux distribution.
More information about installation and available distribution format can be found here.
The documentation lives at https://pylint.pycqa.org/.
Pylint is shipped with following additional commands:
- pyreverse: an UML diagram generator
- symilar: an independent similarities checker
- epylint: Emacs and Flymake compatible Pylint
You should be able to install our tests dependencies with:
pip install -r requirements_test.txt
You can then use pytest directly. If you want to run tests on a specific portion of the code with pytest and your local python version:
# ( pip install pytest-cov ) python3 -m pytest # Everything in tests/message with coverage for the relevant code: python3 -m pytest tests/message/ --cov=pylint.message coverage html # Only the functional test "missing_kwoa_py3": python3 -m pytest "tests/test_functional.py::test_functional[missing_kwoa_py3]"
You can also optionally install tox. To run the test suite for a particular Python version, with tox you can do:
tox -e py39
To run individual tests with tox
, you can do:
tox -e py37 -- -k name_of_the_test
If you're testing new changes in astroid you need to clone astroid and install with an editable installation as follows:
git clone https://github.com/PyCQA/astroid.git cd astroid python3 -m pip install -e .
You can place this badge in your README to let others know your project uses pylint.
Use the badge in your project's README.md (or any other Markdown file):
[![linting: pylint](https://img.shields.io/badge/linting-pylint-yellowgreen)](https://github.com/PyCQA/pylint)
Use the badge in your project's README.rst (or any other rst file):
.. image:: https://img.shields.io/badge/linting-pylint-yellowgreen :target: https://github.com/PyCQA/pylint
If you use GitHub Actions, and one of your CI workflows begins with "name: pylint", you can use GitHub's workflow status badges to show an up-to-date indication of whether pushes to your default branch pass pylint. For more detailed information, check the documentation.
pylint is, with a few exceptions listed below, GPLv2.
The icon files are licensed under the CC BY-SA 4.0 license: