biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / development / python-modules / pytest-examples / default.nix
blobfe4489dcf0eccc42e90d55d22d1fc2673e5e421f
2   lib,
3   black,
4   buildPythonPackage,
5   fetchFromGitHub,
6   hatchling,
7   pytest,
8   pytestCheckHook,
9   pythonOlder,
10   ruff,
13 buildPythonPackage rec {
14   pname = "pytest-examples";
15   version = "0.0.13";
16   pyproject = true;
18   disabled = pythonOlder "3.7";
20   src = fetchFromGitHub {
21     owner = "pydantic";
22     repo = "pytest-examples";
23     rev = "refs/tags/v${version}";
24     hash = "sha256-R0gSWQEGMkJhkeXImyris2wzqjJ0hC3zO0voEdhWLoY=";
25   };
27   postPatch = ''
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}'"
31   '';
33   pythonRemoveDeps = [ "ruff" ];
35   build-system = [
36     hatchling
37   ];
39   buildInputs = [ pytest ];
41   dependencies = [ black ];
43   nativeCheckInputs = [ pytestCheckHook ];
45   pythonImportsCheck = [ "pytest_examples" ];
47   meta = {
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 ];
53   };