This is a flymake backend for python. It's using ruff with json output to generate warnings asynchronously. Using the json output allows fm-ruff to mark the exact location of warnings.
fm-ruff is not yet available on melpa.
With emacs 28, clone the fm-ruff
repository:
git clone https://github.com/schmir/fm-ruff
Call M-x package-install-file
and choose the directory where you cloned the
repository. Add the following to your init file:
(add-hook 'python-mode-hook #'fm-ruff-setup)
You can use package-vc-install to download and install the package automatically:
(unless (package-installed-p 'fm-ruff)
(package-vc-install "https://github.com/schmir/fm-ruff"))
(use-package fm-ruff
:hook (python-mode . fm-ruff-setup))
With emacs 30, add the following to your init file:
(use-package fm-ruff
:vc (:fetcher github :repo schmir/fm-ruff)
:hook (python-mode . fm-ruff-setup))