A tool (and pre-commit hook) to run black
, but with tabs instead of spaces.
$ pip install black-tabby-formatter
See pre-commit for instructions
Sample .pre-commit-config.yaml
:
- repo: https://github.com/MarcoGorelli/black-tabby-formatter
rev: v0.1.1
hooks:
- id: black-tabby-formatter
black-tabby-formatter file.py
To run on a directory, you can do:
black-tabby-formatter `find . -name "*.py"`
or, using pre-commit,
pre-commit try-repo https://github.com/MarcoGorelli/black-tabby-formatter --all-files
.
You can pass extra command-line flags that black
would normally accept, such as --check
. Furthermore, any option you specify
in pyproject.toml
will be respected.