Skip to main content
https://github.com/pylint-dev/pylint/actions/workflows/tests.yaml/badge.svg?branch=main https://codecov.io/gh/pylint-dev/pylint/branch/main/graph/badge.svg?token=ZETEzayrfk PyPI Package version Documentation Status https://img.shields.io/badge/code%20style-black-000000.svg https://img.shields.io/badge/linting-pylint-yellowgreen pre-commit.ci status CII Best Practices OpenSSF Scorecard Discord

What is Pylint?

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

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.

Install

For command line use, pylint is installed with:

pip install pylint

Or if you want to also check spelling with enchant (you might need to install the enchant C library):

pip install pylint[spelling]

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

What differentiates Pylint?

Pylint is not trusting your typing and is inferring the actual values of nodes (for a start because there was no typing when pylint started off) using its internal code representation (astroid). If your code is import logging as argparse, Pylint can check and know that argparse.error(...) is in fact a logging call and not an argparse call. This makes pylint slower, but it also lets pylint find more issues if your code is not fully typed.

[inference] is the killer feature that keeps us using [pylint] in our project despite how painfully slow it is. - Realist pylint user, 2022

pylint, not afraid of being a little slower than it already is, is also a lot more thorough than other linters. There are more checks, including some opinionated ones that are deactivated by default but can be enabled using configuration.

How to use pylint

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 messages with --disable=C,R and progressively re-evaluate and re-enable messages as your priorities evolve.

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.

Advised linters alongside pylint

Projects that you might want to use alongside pylint include ruff (really fast, with builtin auto-fix and a large number of checks taken from popular linters, but implemented in rust) or flake8 (a framework to implement your own checks in python using ast directly), mypy, pyright / pylance 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).

Additional tools included in pylint

Pylint ships with two additional tools:

  • pyreverse (standalone tool that generates package and class diagrams.)

  • symilar (duplicate code finder that is also integrated in pylint)

Contributing

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.

Show your usage

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

https://img.shields.io/badge/linting-pylint-yellowgreen

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

License

pylint is, with a few exceptions listed below, GPLv2.

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

Support

Please check the contact information.

Tidelift

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.

Release files for pylint 3.3.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pylint 3.3.3
File Size Uploaded
pylint-3.3.3.tar.gz 1.5 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for pylint 3.3.3
File Interpreter ABI Platform
pylint-3.3.3-py3-none-any.whl Python 3 none any Details

Total release size:2.0 MB

Release files / pylint-3.3.3.tar.gz

Download URL pylint-3.3.3.tar.gz
Size 1.5 MB
Tags Source
SHA-256 checksum
How to use checksums
07c607523b17e6d16e2ae0d7ef59602e332caa762af64203c24b41c27139f36a
BLAKE2b-256 checksum
How to use checksums
17fde9a739afac274a39596bbe562e9d966db6f3917fdb2bd7322ffc56da0ba2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.8

Release files / pylint-3.3.3-py3-none-any.whl

Download URL pylint-3.3.3-py3-none-any.whl
Size 521.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
26e271a2bc8bce0fc23833805a9076dd9b4d5194e2a02164942cb3cdc37b4183
BLAKE2b-256 checksum
How to use checksums
91e126d55acea92b1ea4d33672e48f09ceeb274e84d7d542a4fb9a32a556db46
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.8

Release history Release notifications | RSS feed

4.0.8

2 release files

4.0.7

2 release files

4.0.6

2 release files

4.0.5

2 release files

4.0.4

2 release files

4.0.3

2 release files

4.0.2

2 release files

4.0.1

2 release files

4.0.0

2 release files

3.3.9

2 release files

3.3.8

2 release files

3.3.7

2 release files

3.3.6

2 release files

3.3.5

2 release files

3.3.4

2 release files

This release

3.3.3 This release

2 release files

3.3.2

2 release files

3.3.1

2 release files

3.3.0

2 release files

3.2.7

2 release files

3.2.6

2 release files

3.2.5

2 release files

3.2.4

2 release files

3.2.3

2 release files

3.2.2

2 release files

3.2.1

2 release files

3.2.0

2 release files

3.1.1

2 release files

3.1.0

2 release files

3.0.4

2 release files

3.0.3

2 release files

3.0.2

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.17.7

2 release files

2.17.6

2 release files

2.17.5

2 release files

2.17.3

2 release files

2.17.1

2 release files

2.16.2

2 release files

2.15.9

2 release files

2.15.7

2 release files

2.15.6

2 release files

2.15.5

2 release files

2.15.4

2 release files

2.15.3

2 release files

2.15.0

2 release files

2.14.5

2 release files

2.14.4

2 release files

2.14.3

2 release files

2.14.2

2 release files

2.13.9

2 release files

2.13.7

2 release files

2.13.6

2 release files

2.13.4

2 release files

2.13.3

2 release files

2.13.2

2 release files

2.13.1

2 release files

2.13.0

2 release files

2.12.1

2 release files

2.12.0

2 release files

2.11.1

2 release files

2.11.0

2 release files

2.10.2

2 release files

2.10.1

2 release files

2.10.0

2 release files

2.9.6

2 release files

2.9.5

2 release files

2.9.4

2 release files

2.9.3

2 release files

2.9.2

2 release files

2.9.1

2 release files

2.9.0

2 release files

2.8.3

2 release files

2.8.2

2 release files

2.8.1

2 release files

2.8.0

2 release files

2.7.4

2 release files

2.7.3

2 release files

2.7.2

2 release files

2.7.1

2 release files

2.7.0

2 release files

2.6.2

2 release files

2.6.1

2 release files

2.6.0

2 release files

2.5.3

2 release files

2.5.2

2 release files

2.5.1

2 release files

2.5.0

2 release files

2.4.4

2 release files

2.4.3

2 release files

2.4.2

2 release files

2.4.1

2 release files

2.4.0

2 release files

2.3.1

2 release files

2.3.0

2 release files

2.2.3

2 release files

2.2.2

2 release files

2.2.1

2 release files

2.2.0

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.9.5

2 release files

1.9.4

2 release files

1.9.3

2 release files

1.9.2

2 release files

1.9.1

2 release files

1.9.0

2 release files

1.8.4

2 release files

1.8.3

2 release files

1.8.2

2 release files

1.8.1

2 release files

1.8.0

2 release files

1.7.6

2 release files

1.7.5

2 release files

1.7.4

2 release files

1.7.3

2 release files

1.7.2

2 release files

1.7.1

2 release files

1.7.0

2 release files

1.6.5

2 release files

1.6.4

2 release files

1.6.3

2 release files

1.6.2

2 release files

1.6.1

2 release files

1.6.0

2 release files

1.5.6

2 release files

1.5.5

2 release files

1.5.4

2 release files

1.5.3

2 release files

1.5.2

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.5

2 release files

1.4.4

2 release files

1.4.3

2 release files

1.4.2

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.1

1 release file

1.3.0

1 release file

1.2.1

1 release file

1.2.0

1 release file

1.1.0

1 release file

1.0.0

1 release file

0.28.0

1 release file

0.27.0

1 release file

0.26.0

1 release file

0.25.2

1 release file

0.25.1

1 release file

0.25.0

1 release file

0.24.0

1 release file

0.23.0

1 release file

0.22.0

1 release file

0.21.3

1 release file

0.21.2

1 release file

0.21.1

1 release file

0.21.0

1 release file

0.20.0

1 release file

0.19.0

1 release file

0.18.1

1 release file

0.18.0

1 release file

0.16.0

1 release file

0.15.2

1 release file

0.14.0

0.13.0

0.12.1

0.11.0

0.10.0

0.8.1

0.7.0

0.6.1

0.6.0

0.4.1

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page