13 buildPythonPackage rec {
14 pname = "pytest-examples";
18 disabled = pythonOlder "3.7";
20 src = fetchFromGitHub {
22 repo = "pytest-examples";
23 rev = "refs/tags/v${version}";
24 hash = "sha256-R0gSWQEGMkJhkeXImyris2wzqjJ0hC3zO0voEdhWLoY=";
28 # ruff binary is used directly, the ruff Python package is not needed
29 substituteInPlace pytest_examples/lint.py \
30 --replace-fail "'ruff'" "'${lib.getExe ruff}'"
33 pythonRemoveDeps = [ "ruff" ];
39 buildInputs = [ pytest ];
41 dependencies = [ black ];
43 nativeCheckInputs = [ pytestCheckHook ];
45 pythonImportsCheck = [ "pytest_examples" ];
48 description = "Pytest plugin for testing examples in docstrings and markdown files";
49 homepage = "https://github.com/pydantic/pytest-examples";
50 changelog = "https://github.com/pydantic/pytest-examples/releases/tag/v${version}";
51 license = lib.licenses.mit;
52 maintainers = with lib.maintainers; [ fab ];