Skip to content

Nova extension to use Ruff, an extremely fast Python linter, written in Rust.

License

Notifications You must be signed in to change notification settings

Aeron/Ruff.novaextension

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ruff Nova Extension

It’s a stand-alone Nova extension to use Ruff, an extremely fast Python linter (and formatter), written in Rust.

Requirements

Before using the extension, it’s necessary to install Ruff itself if you don’t have one already.

Ruff can be installed simply by running pip install ruff.

Configuration

The extension supports both global and workspace configurations. A workspace configuration always overrides a global one.

Options

There are few options available to configure: executable path, check command arguments, and check mode, format command arguments, and format on save. By default, the executable path is /usr/local/bin/ruff, with no additional arguments, checking on change, and formatting on save.

You could alter the executable path if Ruff installed in a different place or if /usr/bin/env usage is desirable.

In the case of /usr/bin/env, it becomes the executable path, and ruff becomes the first argument.

pyproject.toml

The extension respects pyproject.toml, ruff.toml, and .ruff.toml in a project directory as much as ruff command-line utility. So, there’s no need to specify the --config argument explicitly.