Since it builds on
blackdoc supports most options provided by
black, in addition to selecting the available formats.
Options can be set using either command line options or a configuration file in
toml format (by default,
These are command line-only options.
- custom configuration file
- Using the
--configoption, a arbitrary file in
tomlformat can be specified to use instead of
--check, the program will not write back to disk, but instead return
0if no file would be changed,
1if a file would be reformatted and
123if an internal error occurred.
- In addition to the behavior of
--diffwill output a unified diff of the changes that would have been made.
- color / no-color
- Has no effect without
--diff. If enabled, the unified diffs will be colored.
- Print the version and exit.
str. A comma-separated string of python versions (format:
py38). By default, the version is auto-detected per file.
int. How many characters per line to allow. By default, set to 88.
--skip-string-normalization. If enabled, skips the string normalization.
str. A regular expression that matches files and directories that should be included on recursive searches. An empty value means all files are included regardless of the name. Use forward slashes for directories on all platforms (Windows, too). Exclusions are calculated first, inclusions later. By default, set to
str. A regular expression that matches files and directories that should be excluded on recursive searches. An empty value means no paths are excluded. Use forward slashes for directories on all platforms (Windows, too). Exclusions are calculated first, inclusions later. By default, set to
--exclude, but files and directories matching this regex will be excluded even when they are passed explicitly as arguments. By default, set to
str. A comma-separated string of formats to use. By default, all formats are used.
str. A comma-separated string of formats not to use. This affects even formats that were explicitly enabled. By default, no format is disabled.