Skip to main content

black command for setuptools

Project description

Build Status Coverage Status

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.

Files for setuptools-black, version 0.1.5
Filename, size File type Python version Upload date Hashes
Filename, size setuptools_black-0.1.5-py3-none-any.whl (5.3 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size setuptools-black-0.1.5.tar.gz (4.0 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page