mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-07 04:34:29 +08:00
more test folders
This commit is contained in:
@@ -125,7 +125,7 @@ class ManyToManyField(RelatedField, Generic[_T]):
|
|||||||
to: Union[Type[_T], str],
|
to: Union[Type[_T], str],
|
||||||
related_name: Optional[str] = ...,
|
related_name: Optional[str] = ...,
|
||||||
related_query_name: Optional[str] = ...,
|
related_query_name: Optional[str] = ...,
|
||||||
limit_choices_to: Optional[Callable] = ...,
|
limit_choices_to: Optional[Dict[str, Any]] = ...,
|
||||||
symmetrical: Optional[bool] = ...,
|
symmetrical: Optional[bool] = ...,
|
||||||
through: Optional[Union[str, Type[Model]]] = ...,
|
through: Optional[Union[str, Type[Model]]] = ...,
|
||||||
through_fields: Optional[Tuple[str, str]] = ...,
|
through_fields: Optional[Tuple[str, str]] = ...,
|
||||||
|
|||||||
@@ -27,15 +27,15 @@ class HttpResponseBase(Iterable[AnyStr]):
|
|||||||
charset: Optional[str] = ...,
|
charset: Optional[str] = ...,
|
||||||
) -> None: ...
|
) -> None: ...
|
||||||
def serialize_headers(self) -> bytes: ...
|
def serialize_headers(self) -> bytes: ...
|
||||||
def __setitem__(self, header: str, value: Union[str, bytes]) -> None: ...
|
def __setitem__(self, header: Union[str, bytes], value: Union[str, bytes]) -> None: ...
|
||||||
def __delitem__(self, header: str) -> None: ...
|
def __delitem__(self, header: Union[str, bytes]) -> None: ...
|
||||||
def __getitem__(self, header: str) -> str: ...
|
def __getitem__(self, header: Union[str, bytes]) -> str: ...
|
||||||
def has_header(self, header: str) -> bool: ...
|
def has_header(self, header: str) -> bool: ...
|
||||||
def items(self) -> Iterable[Tuple[str, str]]: ...
|
def items(self) -> Iterable[Tuple[str, str]]: ...
|
||||||
@overload
|
@overload
|
||||||
def get(self, header: str, alternate: str) -> str: ...
|
def get(self, header: Union[str, bytes], alternate: str) -> str: ...
|
||||||
@overload
|
@overload
|
||||||
def get(self, header: str) -> Optional[str]: ...
|
def get(self, header: Union[str, bytes]) -> Optional[str]: ...
|
||||||
def set_cookie(
|
def set_cookie(
|
||||||
self,
|
self,
|
||||||
key: str,
|
key: str,
|
||||||
@@ -80,7 +80,7 @@ class HttpResponse(HttpResponseBase):
|
|||||||
def __init__(self, content: object = ..., *args: Any, **kwargs: Any) -> None: ...
|
def __init__(self, content: object = ..., *args: Any, **kwargs: Any) -> None: ...
|
||||||
def serialize(self) -> bytes: ...
|
def serialize(self) -> bytes: ...
|
||||||
@property
|
@property
|
||||||
def content(self) -> bytes: ...
|
def content(self) -> Any: ...
|
||||||
@content.setter
|
@content.setter
|
||||||
def content(self, value: Any) -> None: ...
|
def content(self, value: Any) -> None: ...
|
||||||
@property
|
@property
|
||||||
|
|||||||
@@ -114,6 +114,9 @@ IGNORED_ERRORS = {
|
|||||||
'from_db_value': [
|
'from_db_value': [
|
||||||
'has no attribute "vendor"'
|
'has no attribute "vendor"'
|
||||||
],
|
],
|
||||||
|
'field_deconstruction': [
|
||||||
|
'Incompatible types in assignment (expression has type "ForeignKey[Any]", variable has type "CharField")'
|
||||||
|
],
|
||||||
'get_object_or_404': [
|
'get_object_or_404': [
|
||||||
'Argument 1 to "get_object_or_404" has incompatible type "str"; '
|
'Argument 1 to "get_object_or_404" has incompatible type "str"; '
|
||||||
+ 'expected "Union[Type[Model], Manager[Any], QuerySet[Any]]"',
|
+ 'expected "Union[Type[Model], Manager[Any], QuerySet[Any]]"',
|
||||||
@@ -122,6 +125,12 @@ IGNORED_ERRORS = {
|
|||||||
'Argument 1 to "get_list_or_404" has incompatible type "List[Type[Article]]"; '
|
'Argument 1 to "get_list_or_404" has incompatible type "List[Type[Article]]"; '
|
||||||
+ 'expected "Union[Type[Model], Manager[Any], QuerySet[Any]]"'
|
+ 'expected "Union[Type[Model], Manager[Any], QuerySet[Any]]"'
|
||||||
],
|
],
|
||||||
|
'get_or_create': [
|
||||||
|
'Argument 1 to "update_or_create" of "QuerySet" has incompatible type "**Dict[str, object]"; expected "MutableMapping[str, Any]"'
|
||||||
|
],
|
||||||
|
'httpwrappers': [
|
||||||
|
'Argument 2 to "appendlist" of "QueryDict" has incompatible type "List[str]"; expected "str"'
|
||||||
|
],
|
||||||
'model_inheritance_regress': [
|
'model_inheritance_regress': [
|
||||||
'Incompatible types in assignment (expression has type "List[Supplier]", variable has type "QuerySet[Supplier]")'
|
'Incompatible types in assignment (expression has type "List[Supplier]", variable has type "QuerySet[Supplier]")'
|
||||||
],
|
],
|
||||||
@@ -280,7 +289,7 @@ TESTS_DIRS = [
|
|||||||
'expressions_case',
|
'expressions_case',
|
||||||
# TODO: 'expressions_window',
|
# TODO: 'expressions_window',
|
||||||
# TODO: 'extra_regress',
|
# TODO: 'extra_regress',
|
||||||
# TODO: 'field_deconstruction',
|
'field_deconstruction',
|
||||||
'field_defaults',
|
'field_defaults',
|
||||||
'field_subclassing',
|
'field_subclassing',
|
||||||
# TODO: 'file_storage',
|
# TODO: 'file_storage',
|
||||||
@@ -301,7 +310,7 @@ TESTS_DIRS = [
|
|||||||
# TODO: 'generic_views',
|
# TODO: 'generic_views',
|
||||||
'get_earliest_or_latest',
|
'get_earliest_or_latest',
|
||||||
'get_object_or_404',
|
'get_object_or_404',
|
||||||
# TODO: 'get_or_create',
|
'get_or_create',
|
||||||
# TODO: 'gis_tests',
|
# TODO: 'gis_tests',
|
||||||
'handlers',
|
'handlers',
|
||||||
# TODO: 'httpwrappers',
|
# TODO: 'httpwrappers',
|
||||||
|
|||||||
Reference in New Issue
Block a user