]>
git.madduck.net Git - etc/vim.git/blobdiff - docs/usage.md
madduck's git repository
Every one of the projects in this repository is available at the canonical
URL git://git.madduck.net/madduck/pub/<projectpath> — see
each project's metadata for the exact URL.
All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@ git. madduck. net .
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
SSH access, as well as push access can be individually
arranged .
If you use my repositories frequently, consider adding the following
snippet to ~/.gitconfig and using the third clone URL listed for each
project:
[url "git://git.madduck.net/madduck/"]
insteadOf = madduck:
-*Black* can be installed by running `pip install black`.
+*Black* can be installed by running `pip install black`. It requires
+Python 3.6.0+ to run but you can reformat Python 2 code with it, too.
+*Black* is able to parse all of the new syntax supported on Python 3.6
+*but also *effectively all* the Python 2 syntax at the same time.
+
## Usage
To get started right away with sensible defaults:
```
## Usage
To get started right away with sensible defaults:
```
+black {source_file_or_directory }
-Some basics about the command line help, `black --help`:
+Black doesn't provide many options. You can list them by running
+`black --help`:
Usage: black [OPTIONS] [SRC]...
The uncompromising code formatter.
Options:
Usage: black [OPTIONS] [SRC]...
The uncompromising code formatter.
Options:
- -l, --line-length INTEGER How many character per line to allow. [default:
- 88]
+ -l, --line-length INTEGER How many character per line to allow.
+ [default: 88]
--check Don't write back the files, just return the
status. Return code 0 means nothing would
change. Return code 1 means some files would be
--check Don't write back the files, just return the
status. Return code 0 means nothing would
change. Return code 1 means some files would be
* exits with code 0 unless an internal error occured (or `--check` was
used).
* exits with code 0 unless an internal error occured (or `--check` was
used).
-## Important note about the pre-release of Black
+
+## NOTE: This tool is alpha quality at the moment
*Black* can already successfully format itself and the standard library.
It also sports a decent test suite. However, it is still very new.
*Black* can already successfully format itself and the standard library.
It also sports a decent test suite. However, it is still very new.