You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run mypy with this plugin enabled, it infers the type for CharFields with blank=True as Optional[str].
How is that should be
I believe this is incorrect, as blank=True only permits empty strings, not NULL. It seems like this was allegedly fixed in #39, but I'm still having the same issue. I noticed that if I remove the following lines from DjangoContext.get_field_nullability, it works:
Uh oh!
There was an error while loading. Please reload this page.
What's wrong
When I run mypy with this plugin enabled, it infers the type for CharFields with
blank=True
asOptional[str]
.How is that should be
I believe this is incorrect, as
blank=True
only permits empty strings, not NULL. It seems like this was allegedly fixed in #39, but I'm still having the same issue. I noticed that if I remove the following lines fromDjangoContext.get_field_nullability
, it works:System information
python
version: 3.9.7django
version: 3.2.9mypy
version: 0.910django-stubs
version: 1.9.0django-stubs-ext
version: N/AThe text was updated successfully, but these errors were encountered: