User Guide¶
Configuration¶
All configuration for µfmt is done via the pyproject.toml
file. This is the
same file that is used for configuring black and µsort.
Specifying options requires adding them to the tool.ufmt
namespace,
following this example:
[tool.ufmt]
excludes = [...]
Options available are described as follows:
- excludes: List[str]¶
Optional list of supplemental patterns of file paths to exclude from formatting. Each element must be a string following “gitignore” style matching rules. These excludes will be combined with the contents of the project root’s
.gitignore
file, and any file or directory path that matches any of these patterns will not be formatted.pyproject.toml¶[tool.ufmt] excludes = [ "fizz.py", "foo/", ]
This configuration would ignore the following paths when formatting a project:
fizz.py
bar/fizz.py
foo/buzz.py
foo/bar/baz.py