1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
{
lib,
buildPythonPackage,
django-stubs-ext,
django,
fetchFromGitHub,
hatchling,
redis,
mypy,
pytest-mypy-plugins,
oracledb,
pytestCheckHook,
pythonOlder,
tomli,
types-pytz,
types-pyyaml,
types-redis,
typing-extensions,
}:
buildPythonPackage rec {
pname = "django-stubs";
version = "5.2.2";
pyproject = true;
src = fetchFromGitHub {
owner = "typeddjango";
repo = "django-stubs";
tag = version;
hash = "sha256-kF5g0/rkMQxYTfSrTqzZ6BuqGlE42K/AVhc1/ARc+/c=";
};
build-system = [ hatchling ];
dependencies = [
django
django-stubs-ext
types-pytz
types-pyyaml
typing-extensions
]
++ lib.optionals (pythonOlder "3.11") [ tomli ];
optional-dependencies = {
compatible-mypy = [ mypy ];
oracle = [ oracledb ];
redis = [
redis
types-redis
];
};
nativeCheckInputs = [
pytest-mypy-plugins
pytestCheckHook
]
++ lib.concatAttrValues optional-dependencies;
disabledTests = [
# AttributeError: module 'django.contrib.auth.forms' has no attribute 'SetUnusablePasswordMixin'
"test_find_classes_inheriting_from_generic"
];
disabledTestPaths = [
# Skip type checking
"tests/typecheck/"
];
pythonImportsCheck = [ "django-stubs" ];
meta = {
description = "PEP-484 stubs for Django";
homepage = "https://github.com/typeddjango/django-stubs";
changelog = "https://github.com/typeddjango/django-stubs/releases/tag/${version}";
license = lib.licenses.mit;
maintainers = [ ];
};
}
|