Skip to main content
Pylint is a static code analysis tool for Python or Jupyter Notebooks. It checks your Python code for errors, enforces a coding standard, and looks for code smells. CodeRabbit runs Pylint version 4.0.7.

Supported Files

Pylint will run on files with the following extensions:
  • *.py
  • .ipynb (using nbQA)

Configuration

Pylint is enabled by default. Enable or disable it with .coderabbit.yaml or the CodeRabbit web UI:
.coderabbit.yaml
Pylint supports the following config files:
  • .pylintrc
  • pylintrc
  • .pylintrc.toml
  • pylintrc.toml
CodeRabbit will not run Pylint if no config file is found.

What CodeRabbit runs

Pylint runs per-file in a sandbox. We validate the config before execution.

Security policy and restrictions

CodeRabbit skips Pylint if the configuration declares init-hook, load-plugins, or load_plugins. These options can load repository-controlled code before analysis. When any of these options is present, CodeRabbit skips the Pylint run and produces no Pylint findings for the repository.

When we skip Pylint

CodeRabbit will skip running Pylint when:
  • No config file is found.
  • The config contains init-hook.
  • The config contains load-plugins.
  • The config contains load_plugins.
  • Pylint is already running in GitHub Actions, GitLab CI, CircleCI, or Azure Pipelines.
When the configuration contains any of these three code-loading options, CodeRabbit skips the Pylint run and produces no Pylint findings for the repository.

Profile behavior

In Chill mode, Pylint filters out:
  • Warnings and conventions
  • E0401 (Unable to import)
  • C0301 (Line too long)
In Assertive mode, all findings are reported.

Features

Pylint can detect many issues such as:
  • Coding standard violations (PEP8)
  • Unused variables and imports
  • Undefined variables
  • Code smells and refactoring suggestions
  • Error-prone constructs
  • And many more