From 274387a02b6b9036e314ca14a9cfd53bceffdce4 Mon Sep 17 00:00:00 2001 From: Jae Hyuck Sa Date: Mon, 13 May 2024 03:20:50 +0900 Subject: [PATCH] 5.0: Update django.db.models.field.related (#2151) --- django-stubs/db/models/fields/related.pyi | 2 ++ scripts/stubtest/allowlist_todo_django50.txt | 6 ------ 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/django-stubs/db/models/fields/related.pyi b/django-stubs/db/models/fields/related.pyi index 73ca3da7d..e439897fe 100644 --- a/django-stubs/db/models/fields/related.pyi +++ b/django-stubs/db/models/fields/related.pyi @@ -142,6 +142,8 @@ class ForeignObject(RelatedField[_ST, _GT]): def local_related_fields(self) -> tuple[Field, ...]: ... @cached_property def foreign_related_fields(self) -> tuple[Field, ...]: ... + def get_joining_fields(self, reverse_join: bool = False) -> tuple[tuple[Field, Field], ...]: ... + def get_reverse_joining_fields(self) -> tuple[tuple[Field, Field], ...]: ... class ForeignKey(ForeignObject[_ST, _GT]): _pyi_private_set_type: Any | Combinable diff --git a/scripts/stubtest/allowlist_todo_django50.txt b/scripts/stubtest/allowlist_todo_django50.txt index 32ebe046e..53e797930 100644 --- a/scripts/stubtest/allowlist_todo_django50.txt +++ b/scripts/stubtest/allowlist_todo_django50.txt @@ -10,8 +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.ForeignObject.get_joining_fields -django.contrib.gis.db.models.ForeignObject.get_reverse_joining_fields 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 @@ -42,8 +40,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.ForeignObject.get_joining_fields -django.db.models.ForeignObject.get_reverse_joining_fields django.db.models.ForeignObjectRel.get_joining_fields django.db.models.Func.allowed_default django.db.models.Lookup.allowed_default @@ -59,8 +55,6 @@ 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.ForeignObject.get_joining_fields -django.db.models.fields.related.ForeignObject.get_reverse_joining_fields 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