Skip to content

Commit

Permalink
Merge branch 'master' into basconstraint-init
Browse files Browse the repository at this point in the history
  • Loading branch information
q0w committed Feb 25, 2024
2 parents 25fd113 + ddbc686 commit d02aad7
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
2 changes: 0 additions & 2 deletions django-stubs/contrib/admin/helpers.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ class ActionForm(forms.Form):
action: Any
select_across: Any

checkbox: Any

@type_check_only
class _PrepopulatedDict(TypedDict):
field: BoundField
Expand Down
15 changes: 13 additions & 2 deletions django-stubs/db/models/constraints.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ from django.db.models.base import Model
from django.db.models.expressions import BaseExpression, Combinable
from django.db.models.query_utils import Q
from django.utils.functional import _StrOrPromise
from typing_extensions import Self
from typing_extensions import Self, deprecated

class Deferrable(Enum):
DEFERRED: str
Expand All @@ -18,7 +18,18 @@ class BaseConstraint:
violation_error_code: str | None
violation_error_message: _StrOrPromise | None
default_violation_error_message: _StrOrPromise
def __init__(self, *, name: str, violation_error_message: _StrOrPromise | None = ...) -> None: ...
@overload
def __init__(
self, *, name: str, violation_error_code: str | None = ..., violation_error_message: _StrOrPromise | None = ...
) -> None: ...
@deprecated("Passing positional arguments to BaseConstraint is deprecated and will be removed in Django 6.0")
def __init__(
self,
*args: Any,
name: str | None = ...,
violation_error_code: str | None = ...,
violation_error_message: _StrOrPromise | None = ...,
) -> None: ...
def constraint_sql(self, model: type[Model] | None, schema_editor: BaseDatabaseSchemaEditor | None) -> str: ...
def create_sql(self, model: type[Model] | None, schema_editor: BaseDatabaseSchemaEditor | None) -> str: ...
def remove_sql(self, model: type[Model] | None, schema_editor: BaseDatabaseSchemaEditor | None) -> str: ...
Expand Down
2 changes: 1 addition & 1 deletion django-stubs/db/models/sql/query.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class Query(BaseExpression):
select_related: dict[str, Any] | bool
max_depth: int
values_select: tuple
annotation_select_mask: set[str] | None
annotation_select_mask: list[str] | None
combinator: str | None
combinator_all: bool
combined_queries: tuple
Expand Down
1 change: 0 additions & 1 deletion scripts/stubtest/allowlist_todo_django50.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ django.contrib.admin.filters.EmptyFieldListFilter.get_lookup_condition
django.contrib.admin.filters.FacetsMixin
django.contrib.admin.filters.RelatedFieldListFilter.get_facet_counts
django.contrib.admin.filters.SimpleListFilter.get_facet_counts
django.contrib.admin.helpers.checkbox
django.contrib.admin.options.BaseModelAdmin.lookup_allowed
django.contrib.admin.options.IS_FACETS_VAR
django.contrib.admin.sites.AdminSite.get_model_admin
Expand Down

0 comments on commit d02aad7

Please sign in to comment.