mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-16 00:37:11 +08:00
add clean django-stubs folder, add some tests
This commit is contained in:
12
test/test-data/check-model-fields.test
Normal file
12
test/test-data/check-model-fields.test
Normal file
@@ -0,0 +1,12 @@
|
||||
[case testBasicModelFields]
|
||||
from django.db import models
|
||||
|
||||
|
||||
class User(models.Model):
|
||||
id = models.AutoField(primary_key=True)
|
||||
name = models.CharField(max_length=255)
|
||||
|
||||
user = User()
|
||||
reveal_type(user.id) # E: Revealed type is 'builtins.int'
|
||||
reveal_type(user.name) # E: Revealed type is 'builtins.str'
|
||||
[out]
|
||||
Reference in New Issue
Block a user