Type engine
PyCharm relies on a type engine to power code insight features that depend on type information, including:
Type inference
Type-related diagnostics and inspections
Quick documentation
Inlay hints for inferred types
Code completion suggestions based on inferred types
By default, PyCharm uses its built-in type engine. You can also switch to an external type engine to delegate type analysis to a dedicated tool optimized for large Python codebases.
Built-in type engine
The built-in type engine analyzes your code based on type hints (PEP 484), type comments, stubs, and docstrings, combined with PyCharm's own type inference for unannotated code. It works out of the box without additional setup and supports all interpreter configurations, including local, virtual, Docker, Docker Compose, WSL, SSH, and multi-module projects.
External type engine
An external type engine is a third-party type checker that PyCharm delegates type analysis to. Once enabled, the external engine powers type inference and type-related diagnostics in the editor, replacing the built-in type engine for these features. It provides quick documentation and inlay hints only when you turn them on in the type engine settings.
Pyrefly
Pyrefly is a Python type checker written in Rust. It provides fast type checking, with support for Django and Pydantic.
Switch to Pyrefly as the type engine
Open a Python file and click the Types: Built-in widget in the status bar.
Select Pyrefly. If Pyrefly is not installed, select Install and Use Pyrefly.
To check the Pyrefly version, hover over the Pyrefly icon in the status bar.
Configure the type engine
Go to .
For Type engine, select Built-in or Pyrefly.
To let Pyrefly also provide inlay hints and quick documentation, expand Other Features and select Inlay hints and Documentation. Both checkboxes are cleared by default.