mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-08 21:14:49 +08:00
run black over stubs, add checking to travis
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
from collections import OrderedDict
|
||||
from datetime import datetime
|
||||
from typing import (Any, Callable, Dict, Iterator, List, Optional, Tuple, Type,
|
||||
Union)
|
||||
from typing import Any, Callable, Dict, Iterator, List, Optional, Tuple, Type, Union
|
||||
from unittest.case import TestCase
|
||||
from uuid import UUID
|
||||
|
||||
@@ -13,29 +12,15 @@ from django.test.testcases import SerializeMixin
|
||||
from django.test.utils import LoggingCaptureMixin
|
||||
from django.urls.converters import IntConverter, StringConverter
|
||||
|
||||
|
||||
class OrderedSet:
|
||||
dict: collections.OrderedDict = ...
|
||||
def __init__(
|
||||
self,
|
||||
iterable: Optional[
|
||||
Union[
|
||||
List[Tuple[str, str]],
|
||||
List[datetime],
|
||||
List[Combinable],
|
||||
List[int],
|
||||
List[str],
|
||||
List[UUID],
|
||||
OrderedDict,
|
||||
]
|
||||
Union[List[Tuple[str, str]], List[datetime], List[Combinable], List[int], List[str], List[UUID], OrderedDict]
|
||||
] = ...,
|
||||
) -> None: ...
|
||||
def add(
|
||||
self,
|
||||
item: Union[
|
||||
Type[Model], SerializeMixin, LoggingCaptureMixin, int, TestCase
|
||||
],
|
||||
) -> None: ...
|
||||
def add(self, item: Union[Type[Model], SerializeMixin, LoggingCaptureMixin, int, TestCase]) -> None: ...
|
||||
def remove(self, item: Any) -> None: ...
|
||||
def discard(self, item: Any) -> None: ...
|
||||
def __iter__(self): ...
|
||||
@@ -56,33 +41,17 @@ class MultiValueDict(dict):
|
||||
Tuple,
|
||||
] = ...,
|
||||
) -> None: ...
|
||||
def __getitem__(
|
||||
self, key: str
|
||||
) -> Optional[Union[List[str], UploadedFile, str]]: ...
|
||||
def __setitem__(
|
||||
self, key: str, value: Optional[Union[int, str]]
|
||||
) -> None: ...
|
||||
def __getitem__(self, key: str) -> Optional[Union[List[str], UploadedFile, str]]: ...
|
||||
def __setitem__(self, key: str, value: Optional[Union[int, str]]) -> None: ...
|
||||
def __copy__(self) -> MultiValueDict: ...
|
||||
def __deepcopy__(self, memo: Any): ...
|
||||
def get(
|
||||
self, key: str, default: Optional[Union[int, str]] = ...
|
||||
) -> Optional[Union[InMemoryUploadedFile, int, str]]: ...
|
||||
def getlist(
|
||||
self, key: Optional[Union[Callable, str]], default: Any = ...
|
||||
) -> Any: ...
|
||||
def get(self, key: str, default: Optional[Union[int, str]] = ...) -> Optional[Union[InMemoryUploadedFile, int, str]]: ...
|
||||
def getlist(self, key: Optional[Union[Callable, str]], default: Any = ...) -> Any: ...
|
||||
def setlist(self, key: Union[Callable, str], list_: List[str]) -> None: ...
|
||||
def setdefault(self, key: str, default: str = ...) -> str: ...
|
||||
def setlistdefault(
|
||||
self, key: Union[Callable, str], default_list: None = ...
|
||||
) -> Union[
|
||||
List[
|
||||
Tuple[
|
||||
List[Tuple[str, List[str]]], str, Dict[str, str], Dict[Any, Any]
|
||||
]
|
||||
],
|
||||
List[UploadedFile],
|
||||
List[str],
|
||||
]: ...
|
||||
) -> Union[List[Tuple[List[Tuple[str, List[str]]], str, Dict[str, str], Dict[Any, Any]]], List[UploadedFile], List[str]]: ...
|
||||
def appendlist(
|
||||
self,
|
||||
key: Union[Callable, str],
|
||||
@@ -106,9 +75,7 @@ class MultiValueDict(dict):
|
||||
|
||||
class ImmutableList(tuple):
|
||||
warning: str = ...
|
||||
def __new__(
|
||||
cls: Type[ImmutableList], *args: Any, warning: str = ..., **kwargs: Any
|
||||
) -> ImmutableList: ...
|
||||
def __new__(cls: Type[ImmutableList], *args: Any, warning: str = ..., **kwargs: Any) -> ImmutableList: ...
|
||||
def complain(self, *wargs: Any, **kwargs: Any) -> Any: ...
|
||||
__delitem__: Any = ...
|
||||
__delslice__: Any = ...
|
||||
@@ -127,7 +94,5 @@ class ImmutableList(tuple):
|
||||
class DictWrapper(dict):
|
||||
func: Callable = ...
|
||||
prefix: str = ...
|
||||
def __init__(
|
||||
self, data: Dict[str, str], func: Callable, prefix: str
|
||||
) -> None: ...
|
||||
def __init__(self, data: Dict[str, str], func: Callable, prefix: str) -> None: ...
|
||||
def __getitem__(self, key: str) -> Optional[Union[int, str]]: ...
|
||||
|
||||
Reference in New Issue
Block a user