Files
django-stubs/django/forms/utils.pyi
Maxim Kurnikov a9f215bf64 initial commit
2018-07-29 18:12:23 +03:00

52 lines
1.5 KiB
Python

from datetime import datetime
from django.core.exceptions import ValidationError
from django.utils.safestring import SafeText
from typing import (
Callable,
Dict,
List,
Optional,
Tuple,
Type,
Union,
)
def flatatt(attrs: Dict[str, Union[str, None]]) -> SafeText: ...
def from_current_timezone(value: datetime) -> datetime: ...
def pretty_name(name: str) -> str: ...
def to_current_timezone(value: datetime) -> datetime: ...
class ErrorDict:
def as_data(self) -> Dict[str, List[ValidationError]]: ...
def as_json(self, escape_html: bool = ...) -> str: ...
def as_ul(self) -> SafeText: ...
def get_json_data(self, escape_html: bool = ...) -> Dict[str, List[Dict[str, str]]]: ...
class ErrorList:
def __contains__(self, item: str) -> bool: ...
def __eq__(self, other: Union[List[str], ErrorList]) -> bool: ...
def __getitem__(self, i: Union[str, int]) -> str: ...
def __init__(
self,
initlist: Optional[Union[List[ValidationError], ErrorList, List[str]]] = ...,
error_class: Optional[str] = ...
) -> None: ...
def __reduce_ex__(
self,
*args,
**kwargs
) -> Tuple[Callable, Tuple[Type[ErrorList]], Dict[str, Union[List[ValidationError], str]], None, None]: ...
def __repr__(self) -> str: ...
def as_data(self) -> List[ValidationError]: ...
def as_text(self) -> str: ...
def as_ul(self) -> str: ...
def get_json_data(self, escape_html: bool = ...) -> List[Dict[str, str]]: ...