ruff-formatter

Fast Python code formatter, drop-in replacement for Black with >99.9% compatibility.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "ruff-formatter" with this command: npx skills add frizzle-chan/mudd/frizzle-chan-mudd-ruff-formatter

Ruff Formatter

Fast Python code formatter, drop-in replacement for Black with >99.9% compatibility.

Quick Reference

Format all files in current directory

ruff format .

Format specific file(s)

ruff format path/to/file.py

Check without modifying (CI/pre-commit)

ruff format --check .

Show diff of what would change

ruff format --diff .

Fixing Formatting Issues

When ruff format --check fails:

  • Run ruff format . to auto-fix all formatting

  • Review changes with git diff

  • Commit the formatted code

For import sorting issues, run linter first:

ruff check --select I --fix . # Sort imports ruff format . # Then format

Format Suppression

Disable formatting for specific code:

fmt: off

matrix = [ [1, 0, 0], [0, 1, 0], [0, 0, 1], ]

fmt: on

x = 1 # fmt: skip

Configuration

In pyproject.toml or ruff.toml :

[tool.ruff.format] quote-style = "double" # or "single" indent-style = "space" # or "tab" line-length = 88 # default docstring-code-format = true

Exit Codes

  • 0: Success (files formatted or already formatted)

  • 1: With --check : files need formatting

  • 2: Error (invalid config, CLI error)

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

discord-markdown

No summary provided by upstream source.

Repository SourceNeeds Review
General

postgres-migrations

No summary provided by upstream source.

Repository SourceNeeds Review
General

discord-py

No summary provided by upstream source.

Repository SourceNeeds Review