Skip to content
This repository was archived by the owner on Jul 11, 2022. It is now read-only.

Commit 79b720c

Browse files
committed
Mention how stdio handling works
Fixes pytest-dev#57
1 parent afff418 commit 79b720c

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

‎README.md‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ Options:
5454
--help Show this message and exit.
5555
```
5656

57+
`Black` is a well-behaved Unix-style command-line tool:
58+
* it does nothing if no sources are passed to it;
59+
* it will read from standard input and write to standard output if `-`
60+
is used as the filename;
61+
* it only outputs messages to users on standard error.
62+
5763

5864
## The philosophy behind *Black*
5965

@@ -209,6 +215,12 @@ body.
209215

210216
* Visual Studio Code: [joslarson.black-vscode](https://marketplace.visualstudio.com/items?itemName=joslarson.black-vscode)
211217

218+
Any tool that can pipe code through *Black* using its stdio mode (just
219+
[use `-` as the file name](http://www.tldp.org/LDP/abs/html/special-chars.html#DASHREF2)).
220+
The formatted code will be returned on stdout (unless `--check` was
221+
passed). *Black* will still emit messages on stderr but that shouldn't
222+
affect your use case.
223+
212224
There is currently no integration with any other text editors. Vim and
213225
Atom/Nuclide integration is planned by the author, others will require
214226
external contributions.

0 commit comments

Comments
 (0)