All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
1 # File collection and discovery
3 You can directly pass _Black_ files, but you can also pass directories and _Black_ will
4 walk them, collecting files to format. It determines what files to format or skip
5 automatically using the inclusion and exclusion regexes and as well their modification
8 ## Ignoring unmodified files
10 _Black_ remembers files it has already formatted, unless the `--diff` flag is used or
11 code is passed via standard input. This information is stored per-user. The exact
12 location of the file depends on the _Black_ version and the system on which _Black_ is
13 run. The file is non-portable. The standard location on common operating systems is:
16 `C:\\Users\<username>\AppData\Local\black\black\Cache\<version>\cache.<line-length>.<file-mode>.pickle`
18 `/Users/<username>/Library/Caches/black/<version>/cache.<line-length>.<file-mode>.pickle`
20 `/home/<username>/.cache/black/<version>/cache.<line-length>.<file-mode>.pickle`
22 `file-mode` is an int flag that determines whether the file was formatted as 3.6+ only,
23 as .pyi, and whether string normalization was omitted.
25 To override the location of these files on macOS or Linux, set the environment variable
26 `XDG_CACHE_HOME` to your preferred location. For example, if you want to put the cache
27 in the directory you're running _Black_ from, set `XDG_CACHE_HOME=.cache`. _Black_ will
28 then write the above files to `.cache/black/<version>/`.
32 If `--exclude` is not set, _Black_ will automatically ignore files and directories in
33 `.gitignore` file(s), if present.
35 If you want _Black_ to continue using `.gitignore` while also configuring the exclusion
36 rules, please use `--extend-exclude`.