better stubs

This commit is contained in:
Maxim Kurnikov
2018-08-05 03:13:19 +03:00
parent 4013fe4d03
commit fa718b8e55
380 changed files with 11805 additions and 8503 deletions

View File

@@ -1,41 +1,59 @@
# Stubs for django.utils.datastructures (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from collections import OrderedDict
from typing import (Any, Callable, Dict, Iterator, List, Optional, Tuple, Type,
Union)
from unittest.case import TestCase
from typing import Any, Optional
from django.db.models.base import Model
from django.urls.converters import IntConverter, StringConverter
from typing import Optional, Union
class OrderedSet:
dict: Any = ...
def __init__(self, iterable: Optional[Any] = ...) -> None: ...
def add(self, item: Any) -> None: ...
dict: collections.OrderedDict = ...
def __init__(
self,
iterable: Optional[
Union[List[int], List[Tuple[str, str]], List[None], OrderedDict]
] = ...,
) -> None: ...
def add(self, item: Union[TestCase, Type[Model]]) -> None: ...
def remove(self, item: Any) -> None: ...
def discard(self, item: Any) -> None: ...
def __iter__(self): ...
def __contains__(self, item: Any): ...
def __bool__(self): ...
def __len__(self): ...
def __bool__(self) -> bool: ...
def __len__(self) -> int: ...
class MultiValueDictKeyError(KeyError): ...
class MultiValueDict(dict):
def __init__(self, key_to_list_mapping: Any = ...) -> None: ...
def __repr__(self): ...
def __getitem__(self, key: Any): ...
def __setitem__(self, key: Any, value: Any) -> None: ...
def __getitem__(self, key: str) -> Optional[str]: ...
def __setitem__(self, key: str, value: None) -> None: ...
def __copy__(self): ...
def __deepcopy__(self, memo: Any): ...
def __getstate__(self): ...
def __setstate__(self, obj_dict: Any) -> None: ...
def get(self, key: Any, default: Optional[Any] = ...): ...
def _getlist(self, key: Any, default: Optional[Any] = ..., force_list: bool = ...): ...
def get(
self, key: str, default: Optional[Union[str, int]] = ...
) -> Optional[Union[str, int]]: ...
def getlist(self, key: Any, default: Optional[Any] = ...): ...
def setlist(self, key: Any, list_: Any) -> None: ...
def setlist(self, key: str, list_: List[Any]) -> None: ...
def setdefault(self, key: Any, default: Optional[Any] = ...): ...
def setlistdefault(self, key: Any, default_list: Optional[Any] = ...): ...
def appendlist(self, key: Any, value: Any) -> None: ...
def items(self) -> None: ...
def setlistdefault(
self, key: str, default_list: None = ...
) -> List[str]: ...
def appendlist(
self,
key: Union[Callable, str],
value: Union[
str,
Tuple[
List[Tuple[str, List[str]]],
str,
Dict[Any, Any],
Dict[str, Union[IntConverter, StringConverter]],
],
],
) -> None: ...
def items(self) -> Iterator[Tuple[str, str]]: ...
def lists(self): ...
def values(self) -> None: ...
def copy(self): ...
@@ -43,8 +61,10 @@ class MultiValueDict(dict):
def dict(self): ...
class ImmutableList(tuple):
warning: Any = ...
def __new__(cls, *args: Any, warning: str = ..., **kwargs: Any): ...
warning: str = ...
def __new__(
cls: Type[ImmutableList], *args: Any, warning: str = ..., **kwargs: Any
) -> ImmutableList: ...
def complain(self, *wargs: Any, **kwargs: Any) -> None: ...
__delitem__: Any = ...
__delslice__: Any = ...
@@ -61,7 +81,7 @@ class ImmutableList(tuple):
reverse: Any = ...
class DictWrapper(dict):
func: Any = ...
prefix: Any = ...
func: Callable = ...
prefix: str = ...
def __init__(self, data: Any, func: Any, prefix: Any) -> None: ...
def __getitem__(self, key: str) -> Optional[Union[str, int]]: ...
def __getitem__(self, key: str) -> int: ...