@@ -8,6 +8,7 @@
88, dataclasses
99, mypy-extensions
1010, pathspec
11+, parameterized
1112, regex
1213, toml
1314, typed-ast
@@ -15,13 +16,13 @@
1516
1617buildPythonPackage rec {
1718 pname = "black";
18− version = "20.8b1";
19+ version = "21.5b1";
1920
2021 disabled = pythonOlder "3.6";
2122
2223 src = fetchPypi {
2324 inherit pname version;
24− sha256 = "1spv6sldp3mcxr740dh3ywp25lly9s8qlvs946fin44rl1x5a0hw";
25+ sha256 = "1cdkrl5vw26iy7s23v2zpr39m6g5xsgxhfhagzzflgfbvdc56s93";
2526 };
2627
2728 nativeBuildInputs = [ setuptools_scm ];
@@ -30,19 +31,19 @@ buildPythonPackage rec {
3031 # Black starts a local server and needs to bind a local address.
3132 __darwinAllowLocalNetworking = true;
3233
33− checkInputs = [ pytestCheckHook ];
34+ checkInputs = [ pytestCheckHook parameterized ];
3435
3536 preCheck = ''
3637 export PATH="$PATH:$out/bin"
38+
39+ # The top directory /build matches black's DEFAULT_EXCLUDE regex.
40+ # Make /build the project root for black tests to avoid excluding files.
41+ touch ../.git
3742 '';
3843
3944 disabledTests = [
40− # Don't know why these tests fails
41− "test_cache_multiple_files"
42− "test_failed_formatting_does_not_get_cached"
4345 # requires network access
4446 "test_gen_check_output"
45− "test_process_queue"
4647 ] ++ lib.optionals stdenv.isDarwin [
4748 # fails on darwin
4849 "test_expression_diff"