ruff [files...]

Ruff: An extremely fast Python linter

Arguments

NameDescription
filesfilepaths

Options

NameDescription
--config [config]
  • Repeatable ♾
--select [select]
  • Repeatable ♾
--extend-select [extend_select]
  • Repeatable ♾
--ignore [ignore]
  • Repeatable ♾
--extend-ignore [extend_ignore]
  • Repeatable ♾
--exclude [exclude]
  • Repeatable ♾
--extend-exclude [extend_exclude]
  • Repeatable ♾
--fixable [fixable]
  • Repeatable ♾
--unfixable [unfixable]
  • Repeatable ♾
--per-file-ignores [per_file_ignores]
  • Repeatable ♾
--format [format]
  • Repeatable ♾
--stdin-filename [stdin_filename]
  • Repeatable ♾
--cache-dir [cache_dir]
  • Repeatable ♾
--dummy-variable-rgx [dummy_variable_rgx]
  • Repeatable ♾
--target-version [target_version]
  • Repeatable ♾
--line-length [line_length]
  • Repeatable ♾
--explain [explain]
  • Repeatable ♾
--generate-shell-completion [generate_shell_completion]
  • Repeatable ♾
-v, --verboseEnable verbose logging
-q, --quietPrint lint violations, but nothing else
-s, --silentDisable all logging (but still exit with status code "1" upon detecting lint violations)
-e, --exit-zeroExit with status code "0", even upon detecting lint violations
-w, --watchRun in watch mode by re-running whenever files change
--fixAttempt to automatically fix lint violations
--no-fix
--fix-onlyFix any fixable lint violations, but don't report on leftover violations. Implies `--fix`
--no-fix-only
--diffAvoid writing any fixed files back; instead, output a diff for each changed file to stdout
-n, --no-cacheDisable cache reads
--isolatedIgnore all configuration files
--show-sourceShow violations with source code
--no-show-source
--respect-gitignoreRespect file exclusions via `.gitignore` and other standard ignore files
--no-respect-gitignore
--force-excludeEnforce exclusions, even for paths passed to Ruff directly on the command-line
--no-force-exclude
--update-checkEnable or disable automatic update checks
--no-update-check
--add-noqaEnable automatic additions of `noqa` directives to failing lines
--cleanClear any caches in the current directory or any subdirectories
--show-filesSee the files Ruff will be run against with the current settings
--show-settingsSee the settings Ruff will use to lint a given Python file
-h, --helpPrint help
-V, --versionPrint version