From 7c7d3fbc14ee17073ee7d846762870ec45a21ab7 Mon Sep 17 00:00:00 2001 From: anthony sottile Date: Thu, 9 Nov 2023 11:54:57 -0500 Subject: [PATCH] remove non-model overload for Field descriptor (not upstreamed) hopefully eventually can remove when python/mypy#5570 is solved --- django-stubs/db/models/fields/__init__.pyi | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/django-stubs/db/models/fields/__init__.pyi b/django-stubs/db/models/fields/__init__.pyi index 279131eca5..0853fb9cdf 100644 --- a/django-stubs/db/models/fields/__init__.pyi +++ b/django-stubs/db/models/fields/__init__.pyi @@ -187,10 +187,7 @@ class Field(RegisterLookupMixin, Generic[_ST, _GT]): def __get__(self, instance: None, owner: Any) -> _FieldDescriptor[Self]: ... # Model instance access @overload - def __get__(self, instance: Model, owner: Any) -> _GT: ... - # non-Model instances - @overload - def __get__(self, instance: Any, owner: Any) -> Self: ... + def __get__(self, instance: object, owner: Any) -> _GT: ... def deconstruct(self) -> tuple[str, str, Sequence[Any], dict[str, Any]]: ... def set_attributes_from_name(self, name: str) -> None: ... def db_type_parameters(self, connection: BaseDatabaseWrapper) -> DictWrapper: ...