Skip to content
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

model_to_dict's exclude allowing set #1951

Closed
jamesbraza opened this issue Feb 15, 2024 · 0 comments · Fixed by #1952
Closed

model_to_dict's exclude allowing set #1951

jamesbraza opened this issue Feb 15, 2024 · 0 comments · Fixed by #1952
Labels
bug Something isn't working

Comments

@jamesbraza
Copy link
Contributor

Bug report

#637 was opened about model_to_dict not allowing set. This was fixed in #640 via typing.Collection.

However, #909 seems to have clobbered that change :/

So this issue is to bring back #640 changes

What's wrong

https://github.com/typeddjango/django-stubs/blob/4.2.7/django-stubs/forms/models.pyi#L37

Currently, model_to_dict's exclude is set to allow lists or tuples, but not a set.

How is that should be

Looking at model_to_dict, it should allow a Collection.

System information

  • django-stubs version: 4.2.7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging a pull request may close this issue.

1 participant