Skip to content

Add stub for django.db.models.expressions.Expression.identity #2685

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion django-stubs/db/models/expressions.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ class BaseExpression:
def select_format(self, compiler: SQLCompiler, sql: str, params: _ParamsT) -> _AsSqlType: ...
def get_expression_for_validation(self) -> BaseExpression: ...

class Expression(_Deconstructible, BaseExpression, Combinable): ...
class Expression(_Deconstructible, BaseExpression, Combinable):
@cached_property
def identity(self) -> tuple[Any, ...]: ...

class CombinedExpression(SQLiteNumericMixin, Expression):
connector: str
Expand Down
3 changes: 0 additions & 3 deletions scripts/stubtest/allowlist_todo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ django.contrib.gis.db.models.DurationField.formfield
django.contrib.gis.db.models.DurationField.get_db_converters
django.contrib.gis.db.models.EmailField.formfield
django.contrib.gis.db.models.Exists.empty_result_set_value
django.contrib.gis.db.models.Expression.identity
django.contrib.gis.db.models.ExpressionWrapper.allowed_default
django.contrib.gis.db.models.Extent.is_extent
django.contrib.gis.db.models.Extent3D.is_extent
Expand Down Expand Up @@ -526,7 +525,6 @@ django.db.models.DurationField.formfield
django.db.models.DurationField.get_db_converters
django.db.models.EmailField.formfield
django.db.models.Exists.empty_result_set_value
django.db.models.Expression.identity
django.db.models.ExpressionWrapper.allowed_default
django.db.models.Field.__copy__
django.db.models.Field.__deepcopy__
Expand Down Expand Up @@ -669,7 +667,6 @@ django.db.models.expressions.Func.allowed_default
django.db.models.expressions.When.allowed_default
django.db.models.expressions.Col.relabeled_clone
django.db.models.expressions.Exists.empty_result_set_value
django.db.models.expressions.Expression.identity
django.db.models.expressions.OrderBy.as_oracle
django.db.models.expressions.OrderBy.as_sql
django.db.models.expressions.Ref.relabeled_clone
Expand Down
Loading