Installing Ruff#
Ruff は、PyPI のruff
として入手できます。:
インストールしたら、コマンドラインから Ruff を実行できます。:
$ ruff check # Lint all files in the current directory.
$ ruff format # Format all files in the current directory.
バージョン0.5.0
から、Ruff はスタンドアロンのインストーラでインストールできます。:
$ # On macOS and Linux.
$ curl -LsSf https://astral.sh/ruff/install.sh | sh
$ # On Windows.
$ powershell -c "irm https://astral.sh/ruff/install.ps1 | iex"
$ # For a specific version.
$ curl -LsSf https://astral.sh/ruff/0.5.0/install.sh | sh
$ powershell -c "irm https://astral.sh/ruff/0.5.0/install.ps1 | iex"
macOS HomebrewおよびLinuxbrewユーザーの場合、Ruff は Homebrew のruff
としても利用できます:
Condaユーザーの場合、Ruff はruff
onconda-forge
としても利用できます:
pkgxユーザーの場合、Ruff はpkgx
レジストリのruff
としても利用できます。:
Arch Linuxユーザーの場合、Ruff は公式リポジトリのruff
からも入手できます。:
Alpineユーザーの場合、Ruff はテストリポジトリのruff
からも入手できます。:
openSUSE Tumbleweedユーザーの場合、Ruff はディストリビューションリポジトリからも入手できます。:
Dockerでは、各リリースにはghcr.io/astral-sh/ruff
というタグが付けられ、最新リリースにはlatest
というタグが付けられて公開されています。