Skip to content

Commit aea3f4c

Browse files
committed
Merge branch 'master' into basconstraint-init
2 parents 25fd113 + ddbc686 commit aea3f4c

File tree

4 files changed

+15
-6
lines changed

4 files changed

+15
-6
lines changed

django-stubs/contrib/admin/helpers.pyi

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ class ActionForm(forms.Form):
1919
action: Any
2020
select_across: Any
2121

22-
checkbox: Any
23-
2422
@type_check_only
2523
class _PrepopulatedDict(TypedDict):
2624
field: BoundField

django-stubs/db/models/constraints.pyi

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ from django.db.models.base import Model
77
from django.db.models.expressions import BaseExpression, Combinable
88
from django.db.models.query_utils import Q
99
from django.utils.functional import _StrOrPromise
10-
from typing_extensions import Self
10+
from typing_extensions import Self, deprecated
1111

1212
class Deferrable(Enum):
1313
DEFERRED: str
@@ -18,7 +18,19 @@ class BaseConstraint:
1818
violation_error_code: str | None
1919
violation_error_message: _StrOrPromise | None
2020
default_violation_error_message: _StrOrPromise
21-
def __init__(self, *, name: str, violation_error_message: _StrOrPromise | None = ...) -> None: ...
21+
@overload
22+
def __init__(
23+
self, *, name: str, violation_error_code: str | None = ..., violation_error_message: _StrOrPromise | None = ...
24+
) -> None: ...
25+
@overload
26+
@deprecated("Passing positional arguments to BaseConstraint is deprecated and will be removed in Django 6.0")
27+
def __init__(
28+
self,
29+
*args: Any,
30+
name: str | None = ...,
31+
violation_error_code: str | None = ...,
32+
violation_error_message: _StrOrPromise | None = ...,
33+
) -> None: ...
2234
def constraint_sql(self, model: type[Model] | None, schema_editor: BaseDatabaseSchemaEditor | None) -> str: ...
2335
def create_sql(self, model: type[Model] | None, schema_editor: BaseDatabaseSchemaEditor | None) -> str: ...
2436
def remove_sql(self, model: type[Model] | None, schema_editor: BaseDatabaseSchemaEditor | None) -> str: ...

django-stubs/db/models/sql/query.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class Query(BaseExpression):
6666
select_related: dict[str, Any] | bool
6767
max_depth: int
6868
values_select: tuple
69-
annotation_select_mask: set[str] | None
69+
annotation_select_mask: list[str] | None
7070
combinator: str | None
7171
combinator_all: bool
7272
combined_queries: tuple

scripts/stubtest/allowlist_todo_django50.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ django.contrib.admin.filters.EmptyFieldListFilter.get_lookup_condition
2828
django.contrib.admin.filters.FacetsMixin
2929
django.contrib.admin.filters.RelatedFieldListFilter.get_facet_counts
3030
django.contrib.admin.filters.SimpleListFilter.get_facet_counts
31-
django.contrib.admin.helpers.checkbox
3231
django.contrib.admin.options.BaseModelAdmin.lookup_allowed
3332
django.contrib.admin.options.IS_FACETS_VAR
3433
django.contrib.admin.sites.AdminSite.get_model_admin

0 commit comments

Comments
 (0)