- $ which black
- /usr/local/bin/black # possible location
-
- On Windows:
-
- $ where black
- %LocalAppData%\Programs\Python\Python36-32\Scripts\black.exe # possible location
-
-3. Open External tools in PyCharm with `File -> Settings -> Tools -> External Tools`.
-
-4. Click the + icon to add a new external tool with the following values:
- - Name: Black
- - Description: Black is the uncompromising Python code formatter.
- - Program: <install_location_from_step_2>
- - Arguments: $FilePath$
-
-5. Format the currently opened file by selecting `Tools -> External Tools -> black`.
- - Alternatively, you can set a keyboard shortcut by navigating to `Preferences -> Keymap`.
-
-
-### Vim
-
-Commands and shortcuts:
-
-* `,=` or `:Black` to format the entire file (ranges not supported);
-* `:BlackUpgrade` to upgrade *Black* inside the virtualenv;
-* `:BlackVersion` to get the current version of *Black* inside the
- virtualenv.
-
-Configuration:
-* `g:black_fast` (defaults to `0`)
-* `g:black_linelength` (defaults to `88`)
-* `g:black_virtualenv` (defaults to `~/.vim/black`)
-
-To install, copy the plugin from [vim/plugin/black.vim](https://github.com/ambv/black/tree/master/vim/plugin/black.vim).
-Let me know if this requires any changes to work with Vim 8's builtin
-`packadd`, or Pathogen, or Vundle, and so on.
-
-This plugin **requires Vim 7.0+ built with Python 3.6+ support**. It
-needs Python 3.6 to be able to run *Black* inside the Vim process which
-is much faster than calling an external command.
-
-On first run, the plugin creates its own virtualenv using the right
-Python version and automatically installs *Black*. You can upgrade it later
-by calling `:BlackUpgrade` and restarting Vim.
-
-If you need to do anything special to make your virtualenv work and
-install *Black* (for example you want to run a version from master), just
-create a virtualenv manually and point `g:black_virtualenv` to it.
-The plugin will use it.
-
-**How to get Vim with Python 3.6?**
-On Ubuntu 17.10 Vim comes with Python 3.6 by default.
-On macOS with HomeBrew run: `brew install vim --with-python3`.
-When building Vim from source, use:
-`./configure --enable-python3interp=yes`. There's many guides online how
-to do this.
-
-
-### Visual Studio Code
-
-Use [joslarson.black-vscode](https://marketplace.visualstudio.com/items?itemName=joslarson.black-vscode).
-
-### SublimeText 3
-
-Use [sublack plugin](https://github.com/jgirardet/sublack).
-
-### Other editors
-
-Atom/Nuclide integration is planned by the author, others will
-require external contributions.
-
-Patches welcome! ✨ 🍰 ✨
-
-Any tool that can pipe code through *Black* using its stdio mode (just
-[use `-` as the file name](http://www.tldp.org/LDP/abs/html/special-chars.html#DASHREF2)).
-The formatted code will be returned on stdout (unless `--check` was
-passed). *Black* will still emit messages on stderr but that shouldn't
-affect your use case.
-
-This can be used for example with PyCharm's [File Watchers](https://www.jetbrains.com/help/pycharm/file-watchers.html).
-
-
-## Version control integration
-
-Use [pre-commit](https://pre-commit.com/). Once you [have it
-installed](https://pre-commit.com/#install), add this to the
-`.pre-commit-config.yaml` in your repository:
-```yaml
-repos:
-- repo: https://github.com/ambv/black
- rev: stable
- hooks:
- - id: black
- args: [--line-length=88, --safe]
- python_version: python3.6
-```
-Then run `pre-commit install` and you're ready to go.
-
-`args` in the above config is optional but shows you how you can change
-the line length if you really need to. If you're already using Python
-3.7, switch the `python_version` accordingly. Finally, `stable` is a tag
-that is pinned to the latest release on PyPI. If you'd rather run on
-master, this is also an option.
-
-
-## Ignoring non-modified files
-
-*Black* remembers files it already formatted, unless the `--diff` flag is used or
-code is passed via standard input. This information is stored per-user. The exact
-location of the file depends on the black version and the system on which black
-is run. The file is non-portable. The standard location on common operating systems
-is:
-
-* Windows: `C:\\Users\<username>\AppData\Local\black\black\Cache\<version>\cache.pickle`
-* macOS: `/Users/<username>/Library/Caches/black/<version>/cache.pickle`
-* Linux: `/home/<username>/.cache/black/<version>/cache.pickle`