LinuxCommandLibrary

ruff-format

An extremely fast Python code formatter.

TLDR

Format given files or directories in-place

$ ruff format [path/to/file_or_directory1 path/to/file_or_directory2 ...]
copy


Print which files would have been modified and return a non-zero exit code if there are files to reformat, and zero otherwise
$ ruff format --check
copy


Print what changes would be made without modifying the files
$ ruff format --diff
copy

Copied to clipboard