Skip to content

reflex-dev/ruff-format

Repository files navigation

ruff-format

A fast Python code formatter powered by Ruff's formatting engine.

Overview

ruff-format is a Python package that provides Python bindings to Ruff's Python formatter.

Installation

pip install ruff-format

Usage

from ruff_format import format_string

code = """
def hello(  x,y,   z  ):
    print( x+y+z )
"""

formatted = format_string(code)
print(formatted)

Development

Prerequisites

  • Rust (latest stable)
  • Python 3.8+
  • maturin

Building from source

# Install maturin
pip install maturin

# Build the package
maturin develop

# Or build a release version
maturin build --release

License

MIT

Links

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published