sbdchd / django-types

:doughnut: Type stubs for Django
MIT License
188 stars 62 forks source link

`django.core.mail.get_connection` return a stricter type #27

Open sbdchd opened 3 years ago

sbdchd commented 3 years ago

Currently get_connection returns Any but can it return a Protocol or something? I feel like we could do something with the import literals like:

get_connection(backend="django.core.mail.backends.smtp.EmailBackend")