Python tools support
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, Pyrefly, 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:

If Python tools are detected in your project environment, 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: . 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.
The Lookup column, which shows how PyCharm locates the tool executable. PyCharm tries the sources in the following order and uses the first one where it finds the tool:
Env: the tool package installed in a project environment. If the project has several environments, Env also shows how many of them have the tool, for example, Env (1/3).
Path: an executable available in the system
$PATH, or an explicit path that you provide.uvx: PyCharm runs the tool through uv without installing it into an environment.
The source that PyCharm uses is shown in bold. If an enabled tool is not found in any source, the whole lookup chain is shown in red.
Additional settings for tool configuration.
To open the additional settings, click
next to the tool name, or click the row of the tool.
A per-tool Features list where you can select what capabilities the tool should provide in the editor (for example, inspections, completions, inlay hints, formatting, or import optimization). The list of available features depends on the tool.
The Env section, which lists each project environment with the path and the version of the tool. If the tool is not installed in an environment, Not installed and an Install link appear next to the environment name. Click Install to install the tool into this environment.
The Path line, which displays the path to the executable and its version. To select another executable, click
(Browse for executable).
Depending on the state of the tool, one of the following links appears next to the path:
Install: install the tool and use it globally.
Upgrade: upgrade the tool to a newer version.
Use auto-detection: discard the executable that you selected manually and detect the tool automatically.
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:
Enable basedpyright.
Open a file in your project that contains a basedpyright type-checking error.
Go to (or press Ctrl+Shift+A), search for , and select it.
basedpyright creates a baseline.json file in the .basedpyright directory. It ignores the errors listed in this file and continues to report new type errors.
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.
You can also use the Arguments field to specify additional options or override the settings from pyproject.toml.
For more information, refer to the Black CLI reference.
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:
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

Completions for rule codes and configuration options

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

You can enable the following Ruff options:
Sort imports when formatting: if Formatting is enabled, Ruff also sorts imports when you reformat a whole file. It does not remove unused imports.
Run code fixes on save: when you save a Python file, Ruff applies its safe fixes for the rules enabled in your project.
Apply Ruff fixes to a scope
You can apply Ruff's safe fixes to all Python files in a project, a module, a directory, or a custom scope at once.
Enable Ruff on the External Tools settings page.
In the main menu, go to .
In the dialog that opens, select the scope and click Analyze.
Ruff applies its safe fixes for the rules enabled in your project to the Python files in the scope. To revert all the changes, press Ctrl+Z.
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: