Skip to content

pytest plugin to enable formatting checks with black

License

Notifications You must be signed in to change notification settings

insertjokehere/pytest-black-ng

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

pytest plugin to enable formatting checks with black

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%