Add SmallAutoField (#710)

* Add SmallAutoField

* Test SmallAutoField presents as int
This commit is contained in:
Craig authored and GitHub committed 2021-09-09 15:58:03 +03:00
1 parent 372b1340a0
commit a1f3712c43
3 files changed
+11

No files matched your search

+9
View File
@@ -174,3 +174,12 @@
obj = EncodedMessage(b'\x010')
reveal_type(obj.message) # N: Revealed type is "Union[builtins.bytes, builtins.memoryview]"
- case: test_small_auto_field_class_presents_as_int
main: |
from django.db import models
class MyModel(models.Model):
small = models.SmallAutoField(primary_key=True)
obj = MyModel()
reveal_type(obj.small) # N: Revealed type is "builtins.int*"