Skip to content

Commit

Permalink
Merge 2ab78ac into 00cadd4
Browse files Browse the repository at this point in the history
  • Loading branch information
Stevoisiak committed Apr 9, 2018
2 parents 00cadd4 + 2ab78ac commit 7c7e514
Showing 1 changed file with 27 additions and 2 deletions.
29 changes: 27 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,33 @@ you should tell Flake8 to ignore these warnings.
Use [proofit404/blacken](https://github.com/proofit404/blacken).


### PyCharm

1. Install `black`.

$ pip install black

2. Locate your `black` installation folder.

$ which black # MacOS/Linux
/usr/local/bin/black # this is just a possible output check yours

<!-->

$ where black # Windows
%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`.


### Vim

Commands and shortcuts:
Expand Down Expand Up @@ -365,8 +392,6 @@ 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

Expand Down

0 comments on commit 7c7e514

Please sign in to comment.