diff --git a/django-stubs/db/models/fields/reverse_related.pyi b/django-stubs/db/models/fields/reverse_related.pyi index 12391396c..077d44bf4 100644 --- a/django-stubs/db/models/fields/reverse_related.pyi +++ b/django-stubs/db/models/fields/reverse_related.pyi @@ -4,7 +4,7 @@ from typing import Any, Literal from django.db.models.base import Model from django.db.models.fields import AutoField, Field, _AllLimitChoicesTo, _ChoicesList, _LimitChoicesTo from django.db.models.fields.related import ForeignKey, ForeignObject, ManyToManyField, OneToOneField -from django.db.models.lookups import Lookup, StartsWith +from django.db.models.lookups import Lookup, StartsWith, Transform from django.db.models.query_utils import FilteredRelation, PathInfo from django.db.models.sql.where import WhereNode from django.utils.functional import cached_property @@ -62,6 +62,8 @@ class ForeignObjectRel(FieldCacheMixin): @cached_property def one_to_one(self) -> bool: ... def get_lookup(self, lookup_name: str) -> type[Lookup] | None: ... + def get_lookups(self) -> dict[str, Any]: ... + def get_transform(self, name: str) -> type[Transform] | None: ... def get_internal_type(self) -> str: ... @property def db_type(self) -> Any: ... @@ -76,6 +78,7 @@ class ForeignObjectRel(FieldCacheMixin): ) -> _ChoicesList: ... def is_hidden(self) -> bool: ... def get_joining_columns(self) -> tuple: ... + def get_joining_fields(self) -> tuple[tuple[Field, Field], ...]: ... def get_extra_restriction( self, where_class: type[WhereNode], alias: str, related_alias: str ) -> StartsWith | WhereNode | None: ... diff --git a/scripts/stubtest/allowlist_todo.txt b/scripts/stubtest/allowlist_todo.txt index 0f8470fa1..a9a227057 100644 --- a/scripts/stubtest/allowlist_todo.txt +++ b/scripts/stubtest/allowlist_todo.txt @@ -315,8 +315,6 @@ django.contrib.gis.db.models.ForeignObject.reverse_path_infos django.contrib.gis.db.models.ForeignObjectRel.__init__ django.contrib.gis.db.models.ForeignObjectRel.empty_strings_allowed django.contrib.gis.db.models.ForeignObjectRel.get_extra_restriction -django.contrib.gis.db.models.ForeignObjectRel.get_lookups -django.contrib.gis.db.models.ForeignObjectRel.get_transform django.contrib.gis.db.models.ForeignObjectRel.identity django.contrib.gis.db.models.ForeignObjectRel.path_infos django.contrib.gis.db.models.Func.function @@ -752,8 +750,6 @@ django.db.models.ForeignObject.reverse_path_infos django.db.models.ForeignObjectRel.__init__ django.db.models.ForeignObjectRel.empty_strings_allowed django.db.models.ForeignObjectRel.get_extra_restriction -django.db.models.ForeignObjectRel.get_lookups -django.db.models.ForeignObjectRel.get_transform django.db.models.ForeignObjectRel.identity django.db.models.ForeignObjectRel.path_infos django.db.models.Func.function @@ -994,8 +990,6 @@ django.db.models.fields.related.ForeignObject.reverse_path_infos django.db.models.fields.related.ForeignObjectRel.__init__ django.db.models.fields.related.ForeignObjectRel.empty_strings_allowed django.db.models.fields.related.ForeignObjectRel.get_extra_restriction -django.db.models.fields.related.ForeignObjectRel.get_lookups -django.db.models.fields.related.ForeignObjectRel.get_transform django.db.models.fields.related.ForeignObjectRel.identity django.db.models.fields.related.ForeignObjectRel.path_infos django.db.models.fields.related.ManyToManyField.__get__ @@ -1026,8 +1020,6 @@ django.db.models.fields.related_lookups.RelatedLookupMixin.as_sql django.db.models.fields.reverse_related.ForeignObjectRel.__init__ django.db.models.fields.reverse_related.ForeignObjectRel.empty_strings_allowed django.db.models.fields.reverse_related.ForeignObjectRel.get_extra_restriction -django.db.models.fields.reverse_related.ForeignObjectRel.get_lookups -django.db.models.fields.reverse_related.ForeignObjectRel.get_transform django.db.models.fields.reverse_related.ForeignObjectRel.identity django.db.models.fields.reverse_related.ForeignObjectRel.path_infos django.db.models.fields.reverse_related.ManyToManyRel.identity diff --git a/scripts/stubtest/allowlist_todo_django50.txt b/scripts/stubtest/allowlist_todo_django50.txt index 53e797930..906d1acd5 100644 --- a/scripts/stubtest/allowlist_todo_django50.txt +++ b/scripts/stubtest/allowlist_todo_django50.txt @@ -10,7 +10,6 @@ django.contrib.gis.db.models.Field.generated django.contrib.gis.db.models.FilteredRelation.relabeled_clone django.contrib.gis.db.models.FilteredRelation.resolve_expression django.contrib.gis.db.models.ForeignKey.cast_db_type -django.contrib.gis.db.models.ForeignObjectRel.get_joining_fields django.contrib.gis.db.models.Func.allowed_default django.contrib.gis.db.models.Lookup.allowed_default django.contrib.gis.db.models.Prefetch.get_current_querysets @@ -40,7 +39,6 @@ django.db.models.Field.generated django.db.models.FilteredRelation.relabeled_clone django.db.models.FilteredRelation.resolve_expression django.db.models.ForeignKey.cast_db_type -django.db.models.ForeignObjectRel.get_joining_fields django.db.models.Func.allowed_default django.db.models.Lookup.allowed_default django.db.models.Prefetch.get_current_querysets @@ -55,12 +53,10 @@ django.db.models.expressions.When.allowed_default django.db.models.fields.Field._get_flatchoices django.db.models.fields.Field.generated django.db.models.fields.related.ForeignKey.cast_db_type -django.db.models.fields.related.ForeignObjectRel.get_joining_fields django.db.models.fields.related.ForwardManyToOneDescriptor.get_prefetch_querysets django.db.models.fields.related.ReverseOneToOneDescriptor.get_prefetch_querysets django.db.models.fields.related_descriptors.ForwardManyToOneDescriptor.get_prefetch_querysets django.db.models.fields.related_descriptors.ReverseOneToOneDescriptor.get_prefetch_querysets -django.db.models.fields.reverse_related.ForeignObjectRel.get_joining_fields django.db.models.functions.Now.as_oracle django.db.models.functions.datetime.Now.as_oracle django.db.models.lookups.Lookup.allowed_default