Custom setuptools command for black formatting tool (see https://github.com/ambv/black).
This package adds the format command to setuptools, which uses black to reformat code:
> python setup.py format
running format
All done! ✨ 🍰 ✨
5 files left unchanged
You may also use customize the build command to enforce format validation at build time.
Build will fail if there's any formatting error.
In your setup.py:
import setuptools_black
...
setuptools.setup(
...
cmdclass={
"build": setuptools_black.BuildCommand,
},
...
)
Note
You'll have to install setuptools-black first, as setup_requires can't be used to install a package which must be imported by setup.py itself...
Release files for setuptools-black 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| setuptools-black-0.1.5.tar.gz | 4.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| setuptools_black-0.1.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.3 kB
Release files / setuptools-black-0.1.5.tar.gz
| Download URL | setuptools-black-0.1.5.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
02d51b8a241c06b74b8411a13d3f1b9adaa0fb4cdb0d083bee3945202a796c5e
|
|
BLAKE2b-256 checksum How to use checksums |
9160cf057579a9ec581a0ba13a5f2d9ef973d856e0420567cd7cf016b99f854c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.6.7
|
Release files / setuptools_black-0.1.5-py3-none-any.whl
| Download URL | setuptools_black-0.1.5-py3-none-any.whl |
|---|---|
| Size | 5.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
40e915207bfa88d80ba32c265730ff355cfa9afe302c49aca11269ebd3d5d359
|
|
BLAKE2b-256 checksum How to use checksums |
a57838847757634c8c4e0134e6b8e1f9893e8261973a300423dbeadd77a784b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.6.7
|