python311Packages.pyannotate: refactor (#348064)

This commit is contained in:
Fabian Affolter
2024-10-12 22:20:07 +02:00
committed by GitHub
@@ -4,14 +4,16 @@
fetchPypi,
mypy-extensions,
pytestCheckHook,
pythonAtLeast,
pythonOlder,
setuptools,
six,
}:
buildPythonPackage rec {
pname = "pyannotate";
version = "1.2.0";
format = "setuptools";
pyproject = true;
disabled = pythonOlder "3.7";
@@ -20,7 +22,9 @@ buildPythonPackage rec {
hash = "sha256-BO1YBLqzgVPVmB/JLYPc9qIog0U3aFYfBX53flwFdZk=";
};
propagatedBuildInputs = [
build-system = [ setuptools ];
dependencies = [
six
mypy-extensions
];
@@ -32,11 +36,20 @@ buildPythonPackage rec {
"pyannotate_tools"
];
disabledTestPaths =
[
"pyannotate_runtime/tests/test_collect_types.py"
]
++ lib.optionals (pythonAtLeast "3.11") [
# Tests are using lib2to3
"pyannotate_tools/fixes/tests/test_annotate*.py"
];
meta = with lib; {
description = "Auto-generate PEP-484 annotations";
mainProgram = "pyannotate";
homepage = "https://github.com/dropbox/pyannotate";
license = licenses.mit;
maintainers = [ ];
mainProgram = "pyannotate";
};
}