sbdchd / django-types

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

Remove __init__ overloads #86

Closed last-partizan closed 2 years ago

last-partizan commented 2 years ago

This fixed invalid error:

Argument of type "Literal[True]" cannot be assigned to parameter "null" of type "Literal[False]" in function "init"

I think, maybe other __init__ with overrides also should be fixed? I can include that in this PR or create others. But i worry about breaking something? Why there was overrides for __init__ in the first place?

Refs #85

last-partizan commented 2 years ago

Hmm, it had broken something, good. So there was point in those overrides.

I'm converting this to draft.

last-partizan commented 2 years ago

I've added failing test case, and it looks like issue with pyright.

last-partizan commented 2 years ago

I'm closing this, until issues with mypy is resolved.