PyCharm 2026.2 Help

Python tools support

Enable the Python LSP plugin

This functionality relies on the Python LSP plugin, which is bundled and enabled in PyCharm by default. If the relevant features are not available, make sure that you did not disable the plugin.

  1. Press Ctrl+Alt+S to open settings and then select Plugins.

  2. Open the Installed tab, find the Python LSP plugin, and select the checkbox next to the plugin name.

PyCharm supports several tools to improve code quality, maintainability, and workflow efficiency:

  • Ruff: a high-performance linter and formatter that detects errors and enforces coding standards.

  • Pyright, basedpyright and ty: fast type checkers providing real-time type analysis.

  • Black: an automatic code formatter that helps maintain a consistent style.

Active LSP tools are displayed at the bottom toolbar when a Python file is open:

Python LSP tools displayed in a toolbar

If Python tools are detected in your project interpreter, PyCharm displays a notification suggesting to enable the tool. Click the notification to enable the tool without opening the settings.

External Tools settings page

All supported external tools are configured on a single page: Python | Tools | External Tools. The page shows a table with every tool currently supported by PyCharm (linters, type checkers, formatters).

For each tool, the table displays the same set of controls:

  • On/Off toggle to enable or disable the tool integration.

  • A per-tool Features widget that lets you pick what capabilities the tool provides in the editor (for example, inspections, completions, inlay hints, formatting, or import optimization). The list of available features depends on the tool.

    To open the widget, enable the required tool and click Configure.

    Configure the tool features widget
  • The Invocation order, which controls how PyCharm locates the tool executable. Sources are tried in the following order:

    1. SDK: the tool package installed in the currently selected project interpreter.

    2. Path: an executable available in the system $PATH, or an explicit path that you provide.

    3. uvx: PyCharm runs the tool through uv without installing it into the interpreter.

    You can reorder or disable individual sources for a specific tool.

  • The Path field with a Browse... Browse... icon. If the tool is not installed yet, an Install button appears next to the path, so you can add the package to the selected interpreter without leaving the settings page.

Ruff

Ruff can highlight issues as you type, suggest fixes, and help maintain consistent code quality across your project. It runs quickly and provides real-time feedback directly in your editor.

Ruff support in PyCharm includes:

  • Formatting

  • Import optimization

  • Quick fixes

  • Configuration file validation

  • Inlay hints for rule codes

    View inlay hints for rule codes
  • Completions for rule codes and configuration options

    Use auto-complete
  • Web links for rule codes and configuration options

    Press Ctrl ( on macOS) and click a rule code or configuration option to open its page in the Ruff documentation.

  • In-editor documentation preview for rule codes and configuration options

    Preview documentation in the editor

You can enable the following Ruff options:

Pyrefly

Pyrefly is a type checker and language server for Python.

You can enable the following Pyrefly options:

Pyright

Pyright is a static type checker for Python.

You can enable the following Pyright options:

basedpyright

basedpyright is a fork of Pyright with various type checking improvements.

You can enable the following basedpyright options:

Write new errors to baseline

A baseline is a way to save the current set of type-checking errors so you can prevent new ones from being introduced while you gradually improve type coverage.

To use a baseline in PyCharm:

  1. Enable basedpyright.

  2. Open a file in your project that contains a basedpyright type-checking error.

  3. Go to Help | Find Action (or press Ctrl+Shift+A), search for basedpyright: Write new errors to baseline, and select it.

    A baseline.json file will be created under the .basedpyright directory, and basedpyright will ignore the errors listed in it while continuing to report any new type errors.

ty

ty is a fast Python type checker, written in Rust. It is currently in preview and could be incomplete.

You can enable the following ty options:

Black

You can use Black to format your Python code in PyCharm.

The settings of the Black formatter can be configured in a pyproject.toml file. For more information, refer to the Black documentation.

For more information, refer to the Black CLI reference.

08 July 2026