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

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page