Change in_bulk id_list param to Iterable rather than Sequence.

This commit is contained in:
Seth Yastrov
2019-02-22 20:02:33 +01:00
parent 2dec3b4325
commit 2dadd681ff
2 changed files with 5 additions and 1 deletions

View File

@@ -84,7 +84,7 @@ class QuerySet(Iterable[_T], Sized):
def latest(self, *fields: Any, field_name: Optional[Any] = ...) -> _T: ... def latest(self, *fields: Any, field_name: Optional[Any] = ...) -> _T: ...
def first(self) -> Optional[_T]: ... def first(self) -> Optional[_T]: ...
def last(self) -> Optional[_T]: ... def last(self) -> Optional[_T]: ...
def in_bulk(self, id_list: Sequence[Any] = ..., *, field_name: str = ...) -> Dict[Any, _T]: ... def in_bulk(self, id_list: Iterable[Any] = ..., *, field_name: str = ...) -> Dict[Any, _T]: ...
def delete(self) -> Tuple[int, Dict[str, int]]: ... def delete(self) -> Tuple[int, Dict[str, int]]: ...
def update(self, **kwargs: Any) -> int: ... def update(self, **kwargs: Any) -> int: ...
def _update(self, values: Any) -> Optional[Any]: ... def _update(self, values: Any) -> Optional[Any]: ...

View File

@@ -214,6 +214,10 @@ IGNORED_ERRORS = {
'logging_tests': [ 'logging_tests': [
re.compile('"(setUpClass|tearDownClass)" undefined in superclass') re.compile('"(setUpClass|tearDownClass)" undefined in superclass')
], ],
'lookup': [
'Unexpected keyword argument "headline__startswith" for "in_bulk" of "QuerySet"',
'note: '
],
'many_to_one': [ 'many_to_one': [
'Incompatible type for "parent" of "Child" (got "None", expected "Union[Parent, Combinable]")' 'Incompatible type for "parent" of "Child" (got "None", expected "Union[Parent, Combinable]")'
], ],