From 5a8e7b3855ea6f7be2b2ab928d02eff9a748d917 Mon Sep 17 00:00:00 2001 From: James Braza Date: Fri, 16 Feb 2024 00:45:58 -0500 Subject: [PATCH] Allowing `set` in `model_to_dict`'s `exclude` (#1952) * Allowing set in model_to_dict exclude * [pre-commit.ci] auto fixes from pre-commit.com hooks --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- django-stubs/forms/models.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/django-stubs/forms/models.pyi b/django-stubs/forms/models.pyi index 455ced550..86f37d24d 100644 --- a/django-stubs/forms/models.pyi +++ b/django-stubs/forms/models.pyi @@ -14,13 +14,13 @@ from django.forms.formsets import BaseFormSet from django.forms.renderers import BaseRenderer from django.forms.utils import ErrorList, _DataT, _FilesT from django.forms.widgets import Widget -from django.utils.datastructures import _IndexableCollection, _ListOrTuple, _PropertyDescriptor +from django.utils.datastructures import _IndexableCollection, _PropertyDescriptor from django.utils.functional import _StrOrPromise from typing_extensions import TypeAlias ALL_FIELDS: Literal["__all__"] -_Fields: TypeAlias = _ListOrTuple[str] | Literal["__all__"] +_Fields: TypeAlias = Collection[str] | Literal["__all__"] _Widgets: TypeAlias = dict[str, type[Widget] | Widget] _Labels: TypeAlias = dict[str, str]