django-types 0.19.1__py3-none-any.whl → 0.21.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- django-stubs/contrib/admin/__init__.pyi +1 -0
- django-stubs/contrib/admin/actions.pyi +2 -2
- django-stubs/contrib/admin/decorators.pyi +4 -3
- django-stubs/contrib/admin/filters.pyi +5 -5
- django-stubs/contrib/admin/models.pyi +23 -11
- django-stubs/contrib/admin/options.pyi +67 -38
- django-stubs/contrib/admin/sites.pyi +11 -11
- django-stubs/contrib/admin/templatetags/base.pyi +1 -1
- django-stubs/contrib/admin/utils.pyi +2 -2
- django-stubs/contrib/admin/views/autocomplete.pyi +2 -2
- django-stubs/contrib/admin/views/main.pyi +8 -7
- django-stubs/contrib/admindocs/middleware.pyi +2 -2
- django-stubs/contrib/auth/__init__.pyi +14 -4
- django-stubs/contrib/auth/admin.pyi +2 -2
- django-stubs/contrib/auth/backends.pyi +22 -0
- django-stubs/contrib/auth/base_user.pyi +3 -3
- django-stubs/contrib/auth/forms.pyi +1 -1
- django-stubs/contrib/auth/middleware.pyi +1 -2
- django-stubs/contrib/auth/models.pyi +50 -26
- django-stubs/contrib/auth/views.pyi +1 -2
- django-stubs/contrib/contenttypes/fields.pyi +1 -1
- django-stubs/contrib/contenttypes/models.pyi +3 -1
- django-stubs/contrib/flatpages/middleware.pyi +2 -2
- django-stubs/contrib/flatpages/views.pyi +3 -3
- django-stubs/contrib/postgres/fields/array.pyi +6 -5
- django-stubs/contrib/postgres/fields/citext.pyi +13 -8
- django-stubs/contrib/postgres/fields/hstore.pyi +5 -4
- django-stubs/contrib/staticfiles/finders.pyi +1 -2
- django-stubs/contrib/staticfiles/views.pyi +2 -2
- django-stubs/contrib/syndication/views.pyi +4 -4
- django-stubs/core/cache/backends/base.pyi +9 -0
- django-stubs/core/exceptions.pyi +18 -11
- django-stubs/core/files/base.pyi +1 -1
- django-stubs/core/files/storage.pyi +2 -2
- django-stubs/core/mail/__init__.pyi +1 -1
- django-stubs/core/mail/backends/base.pyi +1 -0
- django-stubs/core/mail/message.pyi +6 -6
- django-stubs/core/serializers/json.pyi +1 -1
- django-stubs/core/servers/basehttp.pyi +2 -2
- django-stubs/db/backends/utils.pyi +1 -2
- django-stubs/db/migrations/recorder.pyi +1 -1
- django-stubs/db/models/base.pyi +9 -3
- django-stubs/db/models/constraints.pyi +1 -0
- django-stubs/db/models/enums.pyi +10 -19
- django-stubs/db/models/expressions.pyi +1 -1
- django-stubs/db/models/fields/__init__.pyi +227 -77
- django-stubs/db/models/fields/files.pyi +2 -2
- django-stubs/db/models/fields/json.pyi +10 -6
- django-stubs/db/models/fields/related.pyi +42 -20
- django-stubs/db/models/fields/related_descriptors.pyi +3 -3
- django-stubs/db/models/functions/__init__.pyi +2 -0
- django-stubs/db/models/functions/comparison.pyi +8 -0
- django-stubs/db/models/manager.pyi +11 -6
- django-stubs/db/models/query.pyi +4 -1
- django-stubs/db/models/query_utils.pyi +1 -0
- django-stubs/db/transaction.pyi +7 -1
- django-stubs/forms/boundfield.pyi +3 -1
- django-stubs/forms/forms.pyi +28 -35
- django-stubs/forms/formsets.pyi +98 -63
- django-stubs/forms/models.pyi +22 -17
- django-stubs/forms/renderers.pyi +26 -13
- django-stubs/forms/utils.pyi +38 -11
- django-stubs/http/cookie.pyi +3 -1
- django-stubs/http/request.pyi +43 -16
- django-stubs/http/response.pyi +38 -30
- django-stubs/shortcuts.pyi +1 -2
- django-stubs/template/backends/base.pyi +14 -5
- django-stubs/template/backends/django.pyi +24 -3
- django-stubs/template/backends/dummy.pyi +7 -6
- django-stubs/template/backends/jinja2.pyi +20 -2
- django-stubs/template/backends/utils.pyi +3 -3
- django-stubs/template/base.pyi +2 -2
- django-stubs/template/context.pyi +2 -2
- django-stubs/template/context_processors.pyi +1 -2
- django-stubs/template/library.pyi +79 -15
- django-stubs/template/loader.pyi +5 -3
- django-stubs/template/response.pyi +3 -3
- django-stubs/template/utils.pyi +6 -4
- django-stubs/test/client.pyi +176 -20
- django-stubs/test/testcases.pyi +4 -4
- django-stubs/test/utils.pyi +41 -55
- django-stubs/urls/base.pyi +18 -2
- django-stubs/urls/conf.pyi +7 -0
- django-stubs/utils/cache.pyi +4 -4
- django-stubs/utils/datastructures.pyi +5 -5
- django-stubs/utils/deconstruct.pyi +10 -2
- django-stubs/utils/log.pyi +1 -1
- django-stubs/utils/six.pyi +1 -1
- django-stubs/utils/translation/__init__.pyi +5 -3
- django-stubs/utils/translation/trans_real.pyi +2 -2
- django-stubs/views/decorators/csrf.pyi +1 -1
- django-stubs/views/generic/edit.pyi +1 -2
- {django_types-0.19.1.dist-info → django_types-0.21.0.dist-info}/METADATA +12 -8
- {django_types-0.19.1.dist-info → django_types-0.21.0.dist-info}/RECORD +96 -96
- {django_types-0.19.1.dist-info → django_types-0.21.0.dist-info}/WHEEL +1 -1
- {django_types-0.19.1.dist-info → django_types-0.21.0.dist-info}/LICENSE.txt +0 -0
|
@@ -6,6 +6,7 @@ from typing_extensions import Self
|
|
|
6
6
|
from django.core.mail.message import EmailMessage
|
|
7
7
|
|
|
8
8
|
class BaseEmailBackend:
|
|
9
|
+
fail_silently: bool
|
|
9
10
|
def __init__(self, fail_silently: bool = ..., **kwargs: Any) -> None: ...
|
|
10
11
|
def open(self) -> bool | None: ...
|
|
11
12
|
def close(self) -> None: ...
|
|
@@ -26,15 +26,15 @@ class MIMEMixin: ...
|
|
|
26
26
|
|
|
27
27
|
class SafeMIMEMessage(MIMEMixin, MIMEMessage):
|
|
28
28
|
defects: list[Any]
|
|
29
|
-
epilogue: None
|
|
29
|
+
epilogue: None # pyright: ignore[reportIncompatibleVariableOverride]
|
|
30
30
|
policy: Policy # type: ignore [no-any-unimported]
|
|
31
|
-
preamble: None
|
|
31
|
+
preamble: None # pyright: ignore[reportIncompatibleVariableOverride]
|
|
32
32
|
|
|
33
33
|
class SafeMIMEText(MIMEMixin, MIMEText):
|
|
34
34
|
defects: list[Any]
|
|
35
|
-
epilogue: None
|
|
35
|
+
epilogue: None # pyright: ignore[reportIncompatibleVariableOverride]
|
|
36
36
|
policy: Policy # type: ignore [no-any-unimported]
|
|
37
|
-
preamble: None
|
|
37
|
+
preamble: None # pyright: ignore[reportIncompatibleVariableOverride]
|
|
38
38
|
encoding: str = ...
|
|
39
39
|
def __init__(
|
|
40
40
|
self, _text: str, _subtype: str = ..., _charset: str = ...
|
|
@@ -42,9 +42,9 @@ class SafeMIMEText(MIMEMixin, MIMEText):
|
|
|
42
42
|
|
|
43
43
|
class SafeMIMEMultipart(MIMEMixin, MIMEMultipart):
|
|
44
44
|
defects: list[Any]
|
|
45
|
-
epilogue: None
|
|
45
|
+
epilogue: None # pyright: ignore[reportIncompatibleVariableOverride]
|
|
46
46
|
policy: Policy # type: ignore [no-any-unimported]
|
|
47
|
-
preamble: None
|
|
47
|
+
preamble: None # pyright: ignore[reportIncompatibleVariableOverride]
|
|
48
48
|
encoding: str = ...
|
|
49
49
|
def __init__(
|
|
50
50
|
self,
|
|
@@ -28,8 +28,8 @@ class WSGIRequestHandler(simple_server.WSGIRequestHandler):
|
|
|
28
28
|
close_connection: bool
|
|
29
29
|
connection: WSGIRequest
|
|
30
30
|
request: WSGIRequest
|
|
31
|
-
rfile: BytesIO
|
|
32
|
-
wfile: BytesIO
|
|
31
|
+
rfile: BytesIO # pyright: ignore[reportIncompatibleVariableOverride]
|
|
32
|
+
wfile: BytesIO # pyright: ignore[reportIncompatibleVariableOverride]
|
|
33
33
|
protocol_version: str = ...
|
|
34
34
|
def address_string(self) -> str: ...
|
|
35
35
|
def log_message(self, format: str, *args: Any) -> None: ...
|
|
@@ -2,8 +2,7 @@ import types
|
|
|
2
2
|
from collections.abc import Iterable, Iterator, Mapping, Sequence
|
|
3
3
|
from datetime import date, datetime, time
|
|
4
4
|
from decimal import Decimal
|
|
5
|
-
from typing import IO, Any
|
|
6
|
-
from typing_extensions import Literal
|
|
5
|
+
from typing import IO, Any, Literal
|
|
7
6
|
from uuid import UUID
|
|
8
7
|
|
|
9
8
|
import psycopg2.extensions
|
|
@@ -15,7 +15,7 @@ class MigrationRecorder:
|
|
|
15
15
|
def migration_qs(self) -> QuerySet[Any]: ...
|
|
16
16
|
def has_table(self) -> bool: ...
|
|
17
17
|
def ensure_schema(self) -> None: ...
|
|
18
|
-
def applied_migrations(self) ->
|
|
18
|
+
def applied_migrations(self) -> dict[tuple[str, str], Any]: ...
|
|
19
19
|
def record_applied(self, app: str, name: str) -> None: ...
|
|
20
20
|
def record_unapplied(self, app: str, name: str) -> None: ...
|
|
21
21
|
def flush(self) -> None: ...
|
django-stubs/db/models/base.pyi
CHANGED
|
@@ -9,6 +9,7 @@ from django.core.exceptions import (
|
|
|
9
9
|
from django.core.exceptions import ObjectDoesNotExist, ValidationError
|
|
10
10
|
from django.db.models.manager import BaseManager
|
|
11
11
|
from django.db.models.options import Options
|
|
12
|
+
from django.db.models.query import QuerySet
|
|
12
13
|
|
|
13
14
|
class ModelStateFieldsCacheDescriptor: ...
|
|
14
15
|
|
|
@@ -26,7 +27,6 @@ class Model(metaclass=ModelBase):
|
|
|
26
27
|
_default_manager: ClassVar[BaseManager[Self]]
|
|
27
28
|
objects: ClassVar[BaseManager[Self]]
|
|
28
29
|
|
|
29
|
-
class Meta: ...
|
|
30
30
|
pk: Any = ...
|
|
31
31
|
_state: ModelState
|
|
32
32
|
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
|
|
@@ -80,10 +80,16 @@ class Model(metaclass=ModelBase):
|
|
|
80
80
|
update_fields: Iterable[str] | None = ...,
|
|
81
81
|
) -> Any: ...
|
|
82
82
|
def refresh_from_db(
|
|
83
|
-
self,
|
|
83
|
+
self,
|
|
84
|
+
using: str | None = ...,
|
|
85
|
+
fields: list[str] | None = ...,
|
|
86
|
+
from_queryset: QuerySet[Self] | None = ...,
|
|
84
87
|
) -> None: ...
|
|
85
88
|
async def arefresh_from_db(
|
|
86
|
-
self,
|
|
89
|
+
self,
|
|
90
|
+
using: str | None = ...,
|
|
91
|
+
fields: list[str] | None = ...,
|
|
92
|
+
from_queryset: QuerySet[Self] | None = ...,
|
|
87
93
|
) -> None: ...
|
|
88
94
|
def get_deferred_fields(self) -> set[str]: ...
|
|
89
95
|
@classmethod
|
django-stubs/db/models/enums.pyi
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import enum
|
|
2
|
-
from
|
|
2
|
+
from collections.abc import Sequence
|
|
3
|
+
from typing import Any, TypeVar
|
|
4
|
+
|
|
5
|
+
_EnumMemberT = TypeVar("_EnumMemberT")
|
|
3
6
|
|
|
4
7
|
class ChoicesMeta(enum.EnumMeta):
|
|
5
8
|
names: list[str] = ...
|
|
6
|
-
choices: list[tuple[Any, str]] = ...
|
|
7
9
|
labels: list[str] = ...
|
|
8
|
-
values: list[Any] = ...
|
|
9
10
|
def __contains__(self, item: Any) -> bool: ...
|
|
11
|
+
@property
|
|
12
|
+
def values(self: type[_EnumMemberT]) -> Sequence[_EnumMemberT]: ...
|
|
13
|
+
@property
|
|
14
|
+
def choices(self: type[_EnumMemberT]) -> Sequence[tuple[_EnumMemberT, str]]: ...
|
|
10
15
|
|
|
11
16
|
class Choices(enum.Enum, metaclass=ChoicesMeta):
|
|
12
17
|
def __str__(self) -> Any: ...
|
|
@@ -15,24 +20,10 @@ class Choices(enum.Enum, metaclass=ChoicesMeta):
|
|
|
15
20
|
@property
|
|
16
21
|
def value(self) -> Any: ...
|
|
17
22
|
|
|
18
|
-
|
|
19
|
-
class _IntegerChoicesMeta(ChoicesMeta):
|
|
20
|
-
names: list[str] = ...
|
|
21
|
-
choices: list[tuple[int, str]] = ...
|
|
22
|
-
labels: list[str] = ...
|
|
23
|
-
values: list[int] = ...
|
|
24
|
-
|
|
25
|
-
class IntegerChoices(int, Choices, metaclass=_IntegerChoicesMeta):
|
|
23
|
+
class IntegerChoices(int, Choices):
|
|
26
24
|
@property
|
|
27
25
|
def value(self) -> int: ...
|
|
28
26
|
|
|
29
|
-
|
|
30
|
-
class _TextChoicesMeta(ChoicesMeta):
|
|
31
|
-
names: list[str] = ...
|
|
32
|
-
choices: list[tuple[str, str]] = ...
|
|
33
|
-
labels: list[str] = ...
|
|
34
|
-
values: list[str] = ...
|
|
35
|
-
|
|
36
|
-
class TextChoices(str, Choices, metaclass=_TextChoicesMeta):
|
|
27
|
+
class TextChoices(str, Choices):
|
|
37
28
|
@property
|
|
38
29
|
def value(self) -> str: ...
|
|
@@ -49,7 +49,7 @@ class Combinable:
|
|
|
49
49
|
def __radd__(
|
|
50
50
|
self, other: datetime | _Numeric | Combinable | None
|
|
51
51
|
) -> Combinable: ...
|
|
52
|
-
def __rsub__(self, other: _Numeric | Combinable) -> Combinable: ...
|
|
52
|
+
def __rsub__(self, other: datetime | _Numeric | Combinable) -> Combinable: ...
|
|
53
53
|
def __rmul__(self, other: _Numeric | Combinable) -> Combinable: ...
|
|
54
54
|
def __rtruediv__(self, other: _Numeric | Combinable) -> Combinable: ...
|
|
55
55
|
def __rmod__(self, other: int | Combinable) -> Combinable: ...
|