django-types 0.21.0__py3-none-any.whl → 0.23.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.
Files changed (114) hide show
  1. django-stubs/apps/config.pyi +3 -2
  2. django-stubs/conf/global_settings.pyi +9 -9
  3. django-stubs/conf/urls/__init__.pyi +2 -2
  4. django-stubs/contrib/admin/checks.pyi +2 -2
  5. django-stubs/contrib/admin/models.pyi +4 -4
  6. django-stubs/contrib/admin/options.pyi +21 -13
  7. django-stubs/contrib/admin/utils.pyi +1 -2
  8. django-stubs/contrib/admin/views/main.pyi +1 -1
  9. django-stubs/contrib/auth/backends.pyi +2 -2
  10. django-stubs/contrib/auth/decorators.pyi +1 -1
  11. django-stubs/contrib/auth/management/commands/createsuperuser.pyi +1 -1
  12. django-stubs/contrib/auth/models.pyi +3 -3
  13. django-stubs/contrib/contenttypes/fields.pyi +1 -1
  14. django-stubs/contrib/gis/db/models/__init__.pyi +2 -2
  15. django-stubs/contrib/gis/gdal/srs.pyi +4 -4
  16. django-stubs/contrib/gis/geos/geometry.pyi +1 -1
  17. django-stubs/contrib/gis/geos/io.pyi +1 -1
  18. django-stubs/contrib/postgres/fields/array.pyi +1 -1
  19. django-stubs/contrib/postgres/fields/citext.pyi +9 -9
  20. django-stubs/contrib/postgres/fields/hstore.pyi +7 -7
  21. django-stubs/contrib/postgres/fields/ranges.pyi +6 -6
  22. django-stubs/contrib/postgres/search.pyi +3 -3
  23. django-stubs/contrib/sessions/base_session.pyi +1 -1
  24. django-stubs/contrib/sessions/models.pyi +1 -1
  25. django-stubs/contrib/sites/models.pyi +1 -1
  26. django-stubs/core/checks/registry.pyi +2 -2
  27. django-stubs/core/exceptions.pyi +2 -2
  28. django-stubs/core/files/base.pyi +1 -1
  29. django-stubs/core/handlers/wsgi.pyi +3 -3
  30. django-stubs/core/mail/__init__.pyi +2 -1
  31. django-stubs/core/mail/backends/base.pyi +1 -1
  32. django-stubs/core/mail/message.pyi +7 -7
  33. django-stubs/core/management/__init__.pyi +10 -8
  34. django-stubs/core/management/base.pyi +49 -33
  35. django-stubs/core/management/commands/compilemessages.pyi +2 -2
  36. django-stubs/core/servers/basehttp.pyi +1 -1
  37. django-stubs/core/validators.pyi +4 -4
  38. django-stubs/db/backends/base/operations.pyi +2 -2
  39. django-stubs/db/backends/base/schema.pyi +7 -1
  40. django-stubs/db/backends/utils.pyi +3 -3
  41. django-stubs/db/migrations/__init__.pyi +1 -1
  42. django-stubs/db/migrations/migration.pyi +1 -2
  43. django-stubs/db/migrations/operations/base.pyi +41 -16
  44. django-stubs/db/migrations/topological_sort.pyi +1 -1
  45. django-stubs/db/models/__init__.pyi +3 -0
  46. django-stubs/db/models/aggregates.pyi +5 -1
  47. django-stubs/db/models/base.pyi +1 -1
  48. django-stubs/db/models/constants.pyi +8 -1
  49. django-stubs/db/models/constraints.pyi +56 -17
  50. django-stubs/db/models/enums.pyi +3 -1
  51. django-stubs/db/models/expressions.pyi +7 -7
  52. django-stubs/db/models/fields/__init__.pyi +28 -25
  53. django-stubs/db/models/fields/composite.pyi +73 -0
  54. django-stubs/db/models/fields/files.pyi +3 -1
  55. django-stubs/db/models/fields/generated.pyi +84 -0
  56. django-stubs/db/models/fields/json.pyi +3 -1
  57. django-stubs/db/models/fields/related.pyi +26 -21
  58. django-stubs/db/models/indexes.pyi +1 -1
  59. django-stubs/db/models/lookups.pyi +1 -1
  60. django-stubs/db/models/manager.pyi +1 -1
  61. django-stubs/db/models/options.pyi +1 -0
  62. django-stubs/db/models/query.pyi +6 -6
  63. django-stubs/db/utils.pyi +41 -17
  64. django-stubs/dispatch/dispatcher.pyi +33 -26
  65. django-stubs/forms/fields.pyi +4 -4
  66. django-stubs/forms/models.pyi +4 -4
  67. django-stubs/forms/renderers.pyi +1 -1
  68. django-stubs/forms/widgets.pyi +2 -2
  69. django-stubs/http/request.pyi +4 -3
  70. django-stubs/http/response.pyi +9 -3
  71. django-stubs/shortcuts.pyi +17 -32
  72. django-stubs/template/backends/django.pyi +1 -1
  73. django-stubs/template/backends/dummy.pyi +1 -1
  74. django-stubs/template/backends/jinja2.pyi +1 -1
  75. django-stubs/template/base.pyi +5 -5
  76. django-stubs/template/context.pyi +9 -3
  77. django-stubs/template/defaultfilters.pyi +1 -1
  78. django-stubs/template/engine.pyi +2 -2
  79. django-stubs/template/library.pyi +1 -1
  80. django-stubs/template/loader.pyi +2 -4
  81. django-stubs/template/response.pyi +2 -2
  82. django-stubs/template/smartif.pyi +2 -2
  83. django-stubs/test/client.pyi +3 -3
  84. django-stubs/test/html.pyi +2 -2
  85. django-stubs/test/signals.pyi +1 -1
  86. django-stubs/test/testcases.pyi +10 -4
  87. django-stubs/test/utils.pyi +12 -7
  88. django-stubs/urls/conf.pyi +2 -2
  89. django-stubs/utils/archive.pyi +7 -1
  90. django-stubs/utils/connection.pyi +38 -0
  91. django-stubs/utils/datastructures.pyi +1 -0
  92. django-stubs/utils/dateformat.pyi +3 -3
  93. django-stubs/utils/deprecation.pyi +2 -2
  94. django-stubs/utils/functional.pyi +64 -31
  95. django-stubs/utils/safestring.pyi +1 -0
  96. django-stubs/utils/six.pyi +4 -5
  97. django-stubs/utils/timezone.pyi +7 -7
  98. django-stubs/utils/topological_sort.pyi +1 -1
  99. django-stubs/utils/translation/__init__.pyi +15 -6
  100. django-stubs/utils/tree.pyi +2 -2
  101. django-stubs/utils/xmlutils.pyi +2 -1
  102. django-stubs/views/__init__.pyi +2 -0
  103. django-stubs/views/csrf.pyi +4 -4
  104. django-stubs/views/debug.pyi +49 -50
  105. django-stubs/views/decorators/cache.pyi +1 -1
  106. django-stubs/views/decorators/debug.pyi +3 -1
  107. django-stubs/views/defaults.pyi +3 -6
  108. django-stubs/views/generic/dates.pyi +4 -2
  109. django-stubs/views/i18n.pyi +7 -16
  110. django-stubs/views/static.pyi +6 -7
  111. {django_types-0.21.0.dist-info → django_types-0.23.0.dist-info}/METADATA +8 -15
  112. {django_types-0.21.0.dist-info → django_types-0.23.0.dist-info}/RECORD +187 -184
  113. {django_types-0.21.0.dist-info → django_types-0.23.0.dist-info}/WHEEL +1 -1
  114. {django_types-0.21.0.dist-info → django_types-0.23.0.dist-info/licenses}/LICENSE.txt +0 -0
@@ -1,4 +1,5 @@
1
1
  from collections.abc import Callable
2
+ from pathlib import Path
2
3
  from typing import Any
3
4
 
4
5
  from django.http.request import HttpRequest
@@ -8,30 +9,20 @@ from django.views.generic import View
8
9
 
9
10
  LANGUAGE_QUERY_PARAMETER: str
10
11
 
12
+ def builtin_template_path(name: str) -> Path: ...
11
13
  def set_language(request: HttpRequest) -> HttpResponse: ...
12
14
  def get_formats() -> dict[str, list[str] | int | str]: ...
13
15
 
14
- js_catalog_template: str
15
-
16
- def render_javascript_catalog(
17
- catalog: Any | None = ..., plural: Any | None = ...
18
- ) -> Any: ...
19
- def null_javascript_catalog(
20
- request: Any, domain: Any | None = ..., packages: Any | None = ...
21
- ) -> Any: ...
22
-
23
16
  class JavaScriptCatalog(View):
24
17
  head: Callable[..., Any]
25
- domain: str = ...
26
- packages: list[str] = ...
27
- translation: DjangoTranslation = ...
18
+ domain: str
19
+ packages: list[str] | None
20
+ translation: DjangoTranslation
28
21
  def get(self, request: HttpRequest, *args: Any, **kwargs: Any) -> HttpResponse: ...
29
22
  def get_paths(self, packages: list[str]) -> list[str]: ...
30
- def get_plural(self) -> None: ...
23
+ def get_plural(self) -> list[str] | None: ...
31
24
  def get_catalog(self) -> dict[str, list[str] | str]: ...
32
25
  def get_context_data(self, **kwargs: Any) -> dict[str, Any]: ...
33
- def render_to_response(
34
- self, context: dict[str, Any], **response_kwargs: Any
35
- ) -> HttpResponse: ...
26
+ def render_to_response(self, context: dict[str, Any], **response_kwargs: Any) -> HttpResponse: ...
36
27
 
37
28
  class JSONCatalog(JavaScriptCatalog): ...
@@ -1,16 +1,15 @@
1
+ from pathlib import Path
1
2
  from typing import Any
2
3
 
4
+ from django.http import FileResponse, HttpResponse
3
5
  from django.http.request import HttpRequest
4
- from django.http.response import FileResponse
5
6
 
7
+ def builtin_template_path(name: str) -> Path: ...
6
8
  def serve(
7
- request: HttpRequest, path: str, document_root: str = ..., show_indexes: bool = ...
9
+ request: HttpRequest, path: str, document_root: str | None = ..., show_indexes: bool = ...
8
10
  ) -> FileResponse: ...
9
11
 
10
- DEFAULT_DIRECTORY_INDEX_TEMPLATE: str
11
12
  template_translatable: Any
12
13
 
13
- def directory_index(path: Any, fullpath: Any) -> Any: ...
14
- def was_modified_since(
15
- header: str | None = ..., mtime: float = ..., size: int = ...
16
- ) -> bool: ...
14
+ def directory_index(path: Any, fullpath: Any) -> HttpResponse: ...
15
+ def was_modified_since(header: str | None = ..., mtime: float = ...) -> bool: ...
@@ -1,20 +1,14 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: django-types
3
- Version: 0.21.0
3
+ Version: 0.23.0
4
4
  Summary: Type stubs for Django
5
- License: MIT
6
- Keywords: django,types,mypy,stubs
7
- Author: Steve Dignam
8
- Author-email: steve@dignam.xyz
9
- Requires-Python: >=3.10,<4.0
10
- Classifier: License :: OSI Approved :: MIT License
11
- Classifier: Programming Language :: Python :: 3
12
- Classifier: Programming Language :: Python :: 3.10
13
- Classifier: Programming Language :: Python :: 3.11
14
- Classifier: Programming Language :: Python :: 3.12
15
- Classifier: Programming Language :: Python :: 3.13
16
- Requires-Dist: types-psycopg2 (>=2.9.21.13)
17
5
  Project-URL: Repository, https://github.com/sbdchd/django-types
6
+ Author: django-types team & contributors
7
+ License-Expression: MIT
8
+ License-File: LICENSE.txt
9
+ Keywords: django,mypy,stubs,types
10
+ Requires-Python: >=3.10
11
+ Requires-Dist: types-psycopg2>=2.9.21.13
18
12
  Description-Content-Type: text/markdown
19
13
 
20
14
  # django-types [![PyPI](https://img.shields.io/pypi/v/django-types.svg)](https://pypi.org/project/django-types/)
@@ -278,4 +272,3 @@ def activity(request: HttpRequest, team_id: str) -> HttpResponse:
278
272
  ## Releasing a new version
279
273
  1. Navigate to https://github.com/sbdchd/django-types/actions/workflows/bump_version.yml and click "Run workflow".
280
274
  2. Select the version level you wish to increase and click "Run workflow" to bump the version and publish to PyPI.
281
-