shopkeep / pytest-black

pytest plugin to enable formatting checks with black
MIT License
53 stars 23 forks source link

Allow pytest-black to be installed on and 'enabled' on Python 2.7+. #34

Closed jaraco closed 5 years ago

jaraco commented 5 years ago

As laid out in #33, it's useful for projects to be able to require pytest-black, and to enable it with --black, on older Pythons even though it's known not to run there, because that enables projects to adopt pytest-black for the versions that do support it and not have to worry about separate dependencies and invocation strategies depending on the environment.

This PR allows the project to be installed on Python 2.7+ and for Pythons where black is installed (currently 3.6+), allows it to run. It still collects relevant files and skips them when black is unavailable.

iandotmartin commented 5 years ago

lgtm, i'll get this shipped later today