mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-09 05:24:53 +08:00
finish strict_optional support, enable it for typechecking of django tests
This commit is contained in:
@@ -103,4 +103,11 @@ class ParentModel(models.Model):
|
||||
class MyModel(ParentModel):
|
||||
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
|
||||
reveal_type(MyModel().id) # E: Revealed type is 'uuid.UUID*'
|
||||
[out]
|
||||
|
||||
[CASE blank_for_charfield_is_the_same_as_null]
|
||||
from django.db import models
|
||||
class MyModel(models.Model):
|
||||
text = models.CharField(max_length=30, blank=True)
|
||||
MyModel(text=None)
|
||||
[out]
|
||||
Reference in New Issue
Block a user