Make 'python -m black' work (#1460)

This commit is contained in:
Richard Si 2020-05-26 22:42:07 -04:00 committed by GitHub
parent 91715352cd
commit 34613383ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View File

@ -58,6 +58,12 @@ To get started right away with sensible defaults:
black {source_file_or_directory}
```
You can run _Black_ as a package if running it as a script doesn't work:
```sh
python -m black {source_file_or_directory}
```
### Command line options
_Black_ doesn't provide many options. You can list them by running `black --help`:

3
src/black/__main__.py Normal file
View File

@ -0,0 +1,3 @@
from black import patched_main
patched_main()