black command for setuptools
Project description
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...
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file setuptools-black-0.1.5.tar.gz
.
File metadata
- Download URL: setuptools-black-0.1.5.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 02d51b8a241c06b74b8411a13d3f1b9adaa0fb4cdb0d083bee3945202a796c5e |
|
MD5 | 4c3389cec9775927bb2dd70dcdc4d7fc |
|
BLAKE2b-256 | 9160cf057579a9ec581a0ba13a5f2d9ef973d856e0420567cd7cf016b99f854c |
File details
Details for the file setuptools_black-0.1.5-py3-none-any.whl
.
File metadata
- Download URL: setuptools_black-0.1.5-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 40e915207bfa88d80ba32c265730ff355cfa9afe302c49aca11269ebd3d5d359 |
|
MD5 | 74da20d1bbfd7e771f463c76481a68a4 |
|
BLAKE2b-256 | a57838847757634c8c4e0134e6b8e1f9893e8261973a300423dbeadd77a784b7 |