ruff-pycharm-plugin icon indicating copy to clipboard operation
ruff-pycharm-plugin copied to clipboard

PyCharm plugin for ruff. This plugin provides reformat code using ruff.

Ruff PyCharm Plugin

License: MIT JetBrains IntelliJ Plugins Rating Total downloads

A ruff integration plugin for JetBrains PyCharm.

See documentation for more details.

Features

  • [x] Inspection and highlighting
  • [x] Integrating Reformat Code with ⌥⇧ ⌘ L or Ctrl+Alt+L
  • [x] Quick Fix (from mouse-over, ⌥⏎ or Alt+Enter)
    • [x] Show fix message
    • [x] Suppressing warnings with # noqa:
  • [x] Show code explanation tooltips when hovering # noqa: <code>
  • [x] Run ruff --fix as an action
  • [x] Run ruff --fix for a file when the file is saved
  • [x] Detect both global and project-specific instances of ruff
    • [x] Always use global ruff command
    • [x] Custom global ruff executable path
    • [x] Detect a project ruff after packages refreshed
  • [x] Execute ruff command as a new process
  • [x] Support ruff config file path as an option
  • [x] Detect ruff executable in Conda environment
  • [x] Detect ruff executable in WSL
  • [x] Support the Ruff LSP with LSP integration for PyCharm Pro/IDEA Ultimate [Experimental]
    • [x] ruff-lsp integration
    • [x] ruff server integration
    • [x] Live Config Reload: Automatically updates from pyproject.toml and ruff.toml without restarting
  • [x] Support ruff format for ruff version 0.0.289 or later [Experimental]

Support ruff-lsp for only PyCharm Pro/IDEA Ultimate

You can enable it in Preferences/Settings -> Tools -> Ruff -> Use ruff-lsp (Experimental) for PyCharm Pro/IDEA Ultimate

The lsp integration applies only below features:

This is experimental feature.

Screenshots

inspection quickfix settings

Installation

JetBrains Marketplace

You can install the stable version on PyCharm's Marketplace (Preferences -> Plugins -> Marketplace).

search plugin

See the section on managing plugins in the official documentation.

Contribute

See Development section of the documentation.

We are waiting for your contributions to ruff-pycharm-plugin!

Links

Sponsors

JetBrains Logo

JetBrains

Astral Logo

Astral

Datadog, Inc. Logo

Datadog, Inc.