Skip to main content

Python

Phoenix Code supports full code intelligence for Python: completions with documentation, parameter hints, hover info, Go to Definition, Find Usages, and type error checking with quick fixes in the Problems panel.

Everything works the same way as described in Code Intelligence.

Desktop Only

Python code intelligence runs in the desktop app.

Automatic Setup

Python support is powered by Pyrefly, a language server built by Meta. Phoenix Code downloads it (~25 MB) the first time you open a Python file. The progress shows in the status bar, with a stop button to cancel.

Python setup task

Updates are automatic, and if you are offline, the download waits for a connection.

To turn Python code intelligence off, set the codeIntelligence.python preference to false. Setting it back to true downloads the server again.

Formatting with Ruff

The download also includes Ruff, a Python formatter. The Beautify Code command uses it to format your Python files.

If your project has its own Ruff config (pyproject.toml or ruff.toml), it is respected, so formatting matches what you get on the command line.