mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-06 20:24:31 +08:00
QuerySet.in_bulk returns Dict with values of correct model type.
- The keys are still Union[int, str] which doesn't cover all possibilities, but it's not possible to cover without handling this in the plugin, because the type of the Dict keys are dynamic depending on which value for field_name you pass in.
This commit is contained in:
@@ -86,7 +86,7 @@ class QuerySet(Iterable[_T], Sized):
|
||||
def last(self) -> Optional[_T]: ...
|
||||
def in_bulk(
|
||||
self, id_list: Any = ..., *, field_name: str = ..., **kwargs: Any
|
||||
) -> Dict[Union[int, str], models.Model]: ...
|
||||
) -> Dict[Union[int, str], _T]: ...
|
||||
def delete(self) -> Tuple[int, Dict[str, int]]: ...
|
||||
def update(self, **kwargs: Any) -> int: ...
|
||||
def _update(self, values: Any) -> Optional[Any]: ...
|
||||
|
||||
Reference in New Issue
Block a user