Skip to main content

A pytest plugin to enable format checking with black

Project description

pytest-black-ng

A pytest plugin to enable format checking with black.

This is a fork of the original pytest-black plugin by ShopKeep Inc to provide an up-to-date version of this plugin.

Requirements

There is a minimum requirement of black 22.1.0 or later.

Installation

$ pip install pytest-black-ng

Usage

To run pytest with formatting checks provided by black:

$ pytest --black

The plugin will output a diff of suggested formatting changes (if any exist). Changes will not be applied automatically.

Configuration

You can override default black configuration options by placing a pyproject.toml file in your project directory. See example configuration here.

Testing

To run the tests, simply run:

$ pytest
$ flake8

CI takes care of running this against a selecting of Python versions.

License

Distributed under the terms of the MIT license, pytest-black-ng is free and open source software

Issues

If you encounter any problems, please file an issue along with a detailed description.

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

pytest-black-ng-0.4.1.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

pytest_black_ng-0.4.1-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file pytest-black-ng-0.4.1.tar.gz.

File metadata

  • Download URL: pytest-black-ng-0.4.1.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for pytest-black-ng-0.4.1.tar.gz
Algorithm Hash digest
SHA256 20c1d671b2535e5cf6f8fe03d175887a04f549cb2455264bbb81150c941bd701
MD5 0124934d788e110df3a5b5322183242f
BLAKE2b-256 a59125b9d8a1ae32f481f3584338b31be6599940bc1b7ff0898b3c1c6271e509

See more details on using hashes here.

File details

Details for the file pytest_black_ng-0.4.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pytest_black_ng-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d4ef8945ff410e3cb915e82420a67256aaca4e9b60cc68c7da1cd3cc85c27315
MD5 c8ab5e94c7da32e56d7d74702843fb4a
BLAKE2b-256 529e8487c641eda9b272d11fdf1cfc7f27c8496b4c3dbe97ad8349fc68c7fbfc

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page