Go to file
Hugo van Kemenade b72c0dd9a3 Remove redundant compatibility code (#3097)
We no longer support Python 2 so we can remove
the compatibility code we had in place for that version.
2019-09-12 06:10:27 -05:00
.github Add FUNDING.yml for tidelift 2019-07-19 10:12:38 +02:00
appveyor Added support for AppVeroy for CI on Windows 2014-09-22 05:55:23 +02:00
bin Style - Apply isort on all apllicable files 2019-03-20 09:07:35 +01:00
debian Relicense the logo as CC-BY-SA-4.0 (#2786) 2019-03-05 08:29:42 +01:00
doc Allow f-strings as a valid logging string formatting choice 2019-09-10 12:18:46 +02:00
elisp Spelling fixes (#1397) 2017-04-02 15:55:37 +03:00
examples Improve help for options (#2986) 2019-07-09 09:48:06 +03:00
man Improve help for options (#2986) 2019-07-09 09:48:06 +03:00
pylint Remove redundant compatibility code (#3097) 2019-09-12 06:10:27 -05:00
tests Remove redundant compatibility code (#3097) 2019-09-12 06:10:27 -05:00
.copyrite_aliases Add my copyrite alias (#2348) 2018-07-26 08:35:49 +02:00
.coveragerc [ADD] coverage: Enable coveralls and coverage report (#873) 2016-04-26 16:53:30 +03:00
.gitignore add mypy_cache in gitignore 2018-07-17 14:50:56 +05:30
.isort.cfg [isort configuration] More precise excludes in isort.cfg 2019-07-22 12:39:50 +02:00
.pre-commit-config.yaml [functional tests] Modify expected result after moving files 2019-09-10 11:20:16 +02:00
.pre-commit-hooks.yaml Start hosting .pre-commit-hooks.yaml. Refs #2692 2019-07-16 09:36:43 +02:00
.travis.yml Try with a more generic PyPy version 2019-07-10 10:34:38 +02:00
appveyor.yml Drop support for 3.4 in appveyor and use 3.7 instead 2019-06-20 09:51:50 +02:00
ChangeLog [missing-docstring] Break down into class, function, and module 2019-09-10 15:07:01 +02:00
CONTRIBUTORS.txt Remove redundant compatibility code (#3097) 2019-09-12 06:10:27 -05:00
COPYING prepared new version 2006-08-10 15:49:01 +02:00
DEPENDS Prepare 1.4.3 release. 2015-03-14 18:36:49 +02:00
Makefile Remove obsolete clobber command 2018-08-21 10:35:25 +02:00
MANIFEST.in Stopped installing tests with package 2019-06-20 10:02:14 +02:00
pylintrc Fix - add __post_init__ into defining-attr-methods to avoid attribute-defined-outside-init in dataclasses. 2019-07-05 17:21:08 +03:00
pytest.ini Register the acceptance marker for pytest 2019-07-10 09:52:53 +02:00
README.rst Adjut the wording to be less opinionated and mention the editable install 2019-08-19 11:36:05 +02:00
setup.cfg Stopped installing tests with package 2019-06-20 10:02:14 +02:00
setup.py Remove redundant compatibility code (#3097) 2019-09-12 06:10:27 -05:00
tox.ini Stopped installing tests with package 2019-06-20 10:02:14 +02:00

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

README for Pylint - http://pylint.pycqa.org/
============================================

.. image:: https://travis-ci.org/PyCQA/pylint.svg?branch=master
    :target: https://travis-ci.org/PyCQA/pylint

.. image:: https://ci.appveyor.com/api/projects/status/rbvwhakyj1y09atb/branch/master?svg=true
    :alt: AppVeyor Build Status
    :target: https://ci.appveyor.com/project/PCManticore/pylint

.. image:: https://coveralls.io/repos/github/PyCQA/pylint/badge.svg?branch=master
    :target: https://coveralls.io/github/PyCQA/pylint?branch=master


.. image:: https://img.shields.io/pypi/v/pylint.svg
    :alt: Pypi Package version
    :target: https://pypi.python.org/pypi/pylint

.. image:: https://readthedocs.org/projects/pylint/badge/?version=latest
    :target: http://pylint.readthedocs.io/en/latest/?badge=latest
    :alt: Documentation Status

.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
    :target: https://github.com/ambv/black

.. |tideliftlogo| image:: doc/media/Tidelift_Logos_RGB_Tidelift_Shorthand_On-White_small.png
   :width: 75
   :height: 60
   :alt: Tidelift

.. list-table::
   :widths: 10 100

   * - |tideliftlogo|
     - 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.

.. _Tidelift Subscription: https://tidelift.com/subscription/pkg/pypi-pylint?utm_source=pypi-pylint&utm_medium=referral&utm_campaign=readme


======
Pylint
======

**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 code-quality@python.org 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.

Install
-------

Pylint can be simply installed by running::

    pip install pylint

If you are using Python 3.6+, 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_.

Documentation
-------------

The documentation lives at http://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


Testing
-------

We use tox_ for running the test suite. You should be able to install it with::

    pip install tox pytest


To run the test suite for a particular Python version, you can do::

    tox -e py37


To run individual tests with ``tox``, you can do::

    tox -e py37 -- -k name_of_the_test


We use pytest_ for testing ``pylint``, which you can use without using ``tox`` for a faster development cycle.

If you want to run tests on a specific portion of the code with pytest_, (pytest-cov_) and your local python version::

    # ( pip install pytest-cov )
    # Everything:
    python3 -m pytest tests/
    # 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]"


Do not forget to clone astroid_ and install the last version::


    git clone https://github.com/PyCQA/astroid.git

    # From source
    python3 astroid/setup.py build sdist
    pip3 install astroid/dist/astroid*.tar.gz

    # Using an editable installation
    cd astroid
    python3 -m pip install -e .


For more detailed information, check the documentation.

.. _here: http://pylint.pycqa.org/en/latest/user_guide/installation.html
.. _tox: https://tox.readthedocs.io/en/latest/
.. _pytest: https://docs.pytest.org/en/latest/
.. _pytest-cov: https://pypi.org/project/pytest-cov/
.. _astroid: https://github.com/PyCQA/astroid

License
-------

pylint is, with a few exceptions listed below, `GPLv2 <COPYING>`_.

The icon files are licensed under the `CC BY-SA 4.0 <https://creativecommons.org/licenses/by-sa/4.0/>`_ license:

- `doc/logo.png <doc/logo.png>`_
- `doc/logo.svg <doc/logo.svg>`_