1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 black,
6 pytest,
7 setuptools-scm,
8 toml,
9}:
10
11buildPythonPackage rec {
12 pname = "pytest-black";
13 version = "0.3.12";
14 format = "setuptools";
15
16 src = fetchPypi {
17 inherit pname version;
18 sha256 = "1d339b004f764d6cd0f06e690f6dd748df3d62e6fe1a692d6a5500ac2c5b75a5";
19 };
20
21 nativeBuildInputs = [ setuptools-scm ];
22
23 buildInputs = [ pytest ];
24
25 propagatedBuildInputs = [
26 black
27 toml
28 ];
29
30 # does not contain tests
31 doCheck = false;
32 pythonImportsCheck = [ "pytest_black" ];
33
34 meta = with lib; {
35 description = "A pytest plugin to enable format checking with black";
36 homepage = "https://github.com/shopkeep/pytest-black";
37 license = licenses.mit;
38 maintainers = with maintainers; [ jonringer ];
39 };
40}