Skip to content
 
 

Latest commit

 

History

17,112 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tuff

Tuff is a fork of Ruff that provides extra Python formatting options.

Install

With Rust and Cargo installed:

cargo install --git https://github.com/zigai/pyfmt.git --locked --bin tuff ruff

Use

tuff format .

Formatting options

Currently added formatting options:

Option Description
class-fields Align class attribute annotations and defaults.
function-params Align function parameter annotations and defaults.
assignments Align simple assignment operators.
dict-values Align values in multiline dictionaries.
dict-alignment Align dictionary values or colons.
call-keyword-args Align keyword arguments in multiline calls.
import-aliases Align as aliases in imports.
collection-rows Align table-like nested list and tuple rows.
repeated-call-args Align positional args across repeated calls.
with-items Align as targets in multi-item with blocks.
trailing-comments Align neighboring end-of-line comments.
collections Control list, dict, tuple, and set expansion.
docstrings.args-sections Align Google-style argument descriptions.
one-line-suites Collapse simple suites onto one line.

See Custom formatting options for examples.

About

A fork of Ruff that provides extra Python formatting options

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages