Repolode
pylint-dev

pylint-dev/pylint

A static code analyser for Python that checks for errors, enforces coding standards, and flags code smells without running your code.

Stars
5,745
Forks
1,424
Open issues
1,049
Last commit
5 days ago

What is it?

Pylint analyses Python source code without executing it. It looks for errors, enforces a coding standard, flags code smells, and suggests how code could be refactored. It runs from the command line and can be integrated into most editors and IDEs.

Its main difference from other linters is type inference. Pylint uses its internal code representation (astroid) to work out the actual values of nodes, so it can catch problems even in code that lacks type annotations. For example, it can tell that a call through an alias of the logging module is a logging call. This makes it slower than some alternatives, but more thorough, with a larger set of checks, and some opinionated checks that are off by default and can be enabled in configuration.

Pylint is configurable and supports custom plugins for internal rules, and has plugins for frameworks and third-party libraries such as Django and Pydantic. It also ships with pyreverse, which generates package and class diagrams, and symilar, a duplicate code finder.

Key features

  • 01Detects errors and bugs in Python code without running it.
  • 02Infers actual values of code nodes, so it works on code without type annotations.
  • 03Enforces a configurable coding standard and flags code smells.
  • 04Supports custom plugins and framework-specific plugins.
  • 05Includes pyreverse for UML-style diagrams and symilar for duplicate code detection.

Use cases

  • Enforcing code quality and style checks in a Python project's CI pipeline.
  • Linting a legacy codebase gradually, starting with errors only and enabling more checks over time.
  • Adding project-specific rules through custom plugins.
  • Getting real-time lint feedback inside an editor or IDE.

Quick start

  1. 1

    Install pylint with pip

    pip install pylint
  2. 2

    Run pylint on your code (command shown in README is the install step; run pylint on a Python file or package)

Things to know

  • Licensed under GPLv2, a copyleft license that may restrict some proprietary uses.
  • Inference-based analysis makes Pylint noticeably slower than other linters.

In collections

Topics

FAQ

What is pylint?
A static code analyser for Python that checks for errors, enforces coding standards, and flags code smells without running your code. Pylint analyses Python source code without executing it. It looks for errors, enforces a coding standard, flags code smells, and suggests how code could be refactored. It runs from the command line and can be integrated into most editors and IDEs.
Is pylint free to use? What license does it have?
pylint is open source under the GPL-2.0 license. Check the license terms before using it in commercial products.
Is pylint still maintained?
Actively maintained. The last commit to pylint was on Nov 3, 2026.
What can I use pylint for?
Enforcing code quality and style checks in a Python project's CI pipeline. Linting a legacy codebase gradually, starting with errors only and enabling more checks over time. Adding project-specific rules through custom plugins. Getting real-time lint feedback inside an editor or IDE.
How do I install pylint?
Install pylint with pip: pip install pylint Run pylint on your code (command shown in README is the install step; run pylint on a Python file or package)
Where can I get pylint?
The source code and installation instructions are on GitHub: https://github.com/pylint-dev/pylint

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects