Skip to content

Commit

Permalink
Merge 311f2ac into 10bb45c
Browse files Browse the repository at this point in the history
  • Loading branch information
Stevoisiak committed Mar 27, 2018
2 parents 10bb45c + 311f2ac commit 9b70dd4
Showing 1 changed file with 27 additions and 2 deletions.
29 changes: 27 additions & 2 deletions README.md
Expand Up @@ -267,6 +267,33 @@ keep it.

Use [proofit404/blacken](https://github.com/proofit404/blacken).

### PyCharm

(Adapted from [*Pylinting with PyCharm*]https://kirankoduru.github.io/python/pylint-with-pycharm.html))

1. Install `black`.

$ pip install pylint

2. Locate your `black` installation folder.

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

<!-->

$ where pylint # Windows
%LocalAppData%\Programs\Python\Python36-32\Scripts\pylint.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

Expand Down Expand Up @@ -325,8 +352,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).


## Testimonials

Expand Down

0 comments on commit 9b70dd4

Please sign in to comment.