sbdchd / django-types

:doughnut: Type stubs for Django
MIT License
202 stars 63 forks source link

Why a `*` in `TextField.__init__` params ? #53

Open star2000 opened 3 years ago

star2000 commented 3 years ago

https://github.com/sbdchd/django-types/blob/7f8ed6ae7055a5496cd07e91217e536ddd290b75/typings/django/db/models/fields/__init__.pyi#L835-L840 https://github.com/sbdchd/django-types/blob/7f8ed6ae7055a5496cd07e91217e536ddd290b75/typings/django/db/models/fields/__init__.pyi#L862-L866

This * leads to.

TextField('verbose name') # No overload variant of "TextField" matches argument types "str"

There is no * in the upstream, why is it added here? https://github.com/typeddjango/django-stubs/blob/fb125609818057dff8aad807637b3ca9cca5e194/django-stubs/db/models/fields/__init__.pyi#L329

sbdchd commented 3 years ago

Good question, I was going to say because we have some non-optional keyword args following optional keyword args, but that doesn't seem to be the case.

I think the *, can be removed