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
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
.gitignorefile, and any file or directory path that matches any of these patterns will not be formatted.
[tool.ufmt] excludes = [ "fizz.py", "foo/", ]
This configuration would ignore the following paths when formatting a project: