mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-07 20:54:29 +08:00
- Made id_list of type Sequence[Any], rather than Any, according to mkurnikov's review. - Removed **kwargs. - Made returned Dict keys of type Any rather than int or str as it depends on the provided field's type. - Added test with examples from Django docs.
11 lines
439 B
Plaintext
11 lines
439 B
Plaintext
[CASE test_queryset]
|
|
from django.db import models
|
|
|
|
class Blog(models.Model):
|
|
slug = models.CharField(max_length=100)
|
|
reveal_type(Blog.objects.in_bulk([1])) # E: Revealed type is 'builtins.dict[Any, main.Blog*]'
|
|
reveal_type(Blog.objects.in_bulk()) # E: Revealed type is 'builtins.dict[Any, main.Blog*]'
|
|
reveal_type(Blog.objects.in_bulk(['beatles_blog'], field_name='slug')) # E: Revealed type is 'builtins.dict[Any, main.Blog*]'
|
|
|
|
[out]
|