Pylint Save

It's not just a linter that annoys you!

Project README


.. _Pylint:

.. This is used inside the doc to recover the start of the introduction

.. image:: :target:

.. image:: :target:

.. image:: :alt: Pypi Package version :target:

.. image:: :target: :alt: Documentation Status

.. image:: :target:

.. image:: :target:

.. image:: :target: :alt: status

.. image:: :target: :alt: CII Best Practices

.. image:: :target: :alt: OpenSSF Scorecard

.. image:: :target: :alt: Discord

What is Pylint?

Pylint is a static code analyser_ for Python 2 or 3. The latest version supports Python 3.7.2 and above.

.. _static code analyser:

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). If your code is import logging as argparse, Pylint will know that argparse.error(...) is in fact a logging call and not an argparse call.

.. _code smells:

Pylint is highly configurable and permits to write plugins in order to add your own checks (for example, for internal libraries or an internal rule). Pylint also has an ecosystem of existing plugins for popular frameworks and third party libraries.

.. note::

Pylint supports the Python standard library out of the box. Third-party
libraries are not always supported, so a plugin might be needed. A good place
to start is ``PyPI`` which often returns a plugin by searching for
``pylint <library>``. `pylint-pydantic`_, `pylint-django`_ and
`pylint-sonarjson`_ are examples of such plugins. More information about plugins
and how to load them can be found at `plugins`_.

.. _plugins: .. _pylint-pydantic: .. _pylint-django: .. _pylint-sonarjson:

Pylint isn't smarter than you: it may warn you about things that you have conscientiously done or check for some things that you don't care about. During adoption, especially in a legacy project where pylint was never enforced, it's best to start with the --errors-only flag, then disable convention and refactor message with --disable=C,R and progressively re-evaluate and re-enable messages as your priorities evolve.

Pylint ships with three additional tools:

  • pyreverse_ (standalone tool that generates package and class diagrams.)
  • symilar_ (duplicate code finder that is also integrated in pylint)

.. _pyreverse: .. _symilar:

The epylint_ Emacs package, which includes Flymake support, is now maintained in its own repository_.

.. _epylint: .. _its own repository:

Projects that you might want to use alongside pylint include flake8_ (faster and simpler checks with very few false positives), mypy_, pyright_ or pyre_ (typing checks), bandit_ (security oriented checks), black_ and isort_ (auto-formatting), autoflake_ (automated removal of unused imports or variables), pyupgrade_ (automated upgrade to newer python syntax) and pydocstringformatter_ (automated pep257).

.. _flake8: .. _bandit: .. _mypy: .. _pyright: .. _pyre: .. _black: .. _autoflake: .. _pyupgrade: .. _pydocstringformatter: .. _isort:

.. This is used inside the doc to recover the end of the introduction


.. This is used inside the doc to recover the start of the short text for installation

For command line use, pylint is installed with::

pip install pylint

It can also be integrated in most editors or IDEs. More information can be found in the documentation_.

.. _in the documentation:

.. This is used inside the doc to recover the end of the short text for installation


.. This is used inside the doc to recover the start of the short text for contribution

We welcome all forms of contributions such as updates for documentation, new code, checking issues for duplicates or telling us that we can close them, confirming that issues still exist, creating issues because you found a bug or want a feature_, etc. Everything is much appreciated!

Please follow the code of conduct_ and check the Contributor Guides_ if you want to make a code contribution.

.. _creating issues because you found a bug or want a feature: .. _code of conduct: .. _the Contributor Guides:

.. This is used inside the doc to recover the end of the short text for contribution

Show your usage

You can place this badge in your README to let others know your project uses pylint.

.. image::

Learn how to add a badge to your documentation in the the badge documentation_.

.. _the badge documentation:


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

The icon files are licensed under the CC BY-SA 4.0 <>_ license:

  • doc/logo.png <>_
  • doc/logo.svg <>_


Please check the contact information_.

.. _the contact information:

.. |tideliftlogo| image:: :width: 200 :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:

Open Source Agenda is not affiliated with "Pylint" Project. README Source: PyCQA/pylint
Open Issues
Last Commit
4 days ago

Open Source Agenda Badge

Open Source Agenda Rating