16 buildPythonPackage rec {
20 # Some files for tests missing from PyPi
21 # https://github.com/Instagram/LibCST/issues/331
22 src = fetchFromGitHub {
26 sha256 = "sha256-19yGaKBLpGASSPv/aSX0kx9lh2JxKExHJDKKtuBbuqI=";
29 disabled = pythonOlder "3.6";
31 propagatedBuildInputs = [ hypothesis typing-extensions typing-inspect pyyaml ]
32 ++ lib.optional (pythonOlder "3.7") dataclasses;
34 checkInputs = [ black hypothesmith isort pytestCheckHook ];
36 # can't run tests due to circular dependency on hypothesmith -> licst
40 python -m libcst.codegen.generate visitors
41 python -m libcst.codegen.generate return_types
44 pythonImportsCheck = [ "libcst" ];
47 description = "A Concrete Syntax Tree (CST) parser and serializer library for Python.";
48 homepage = "https://github.com/Instagram/libcst";
49 license = with licenses; [ mit asl20 psfl ];
50 maintainers = with maintainers; [ ruuda SuperSandro2000 ];