mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-20 10:51:16 +08:00
third iteration of stubs
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
from html.parser import HTMLParser
|
||||
from typing import Any, Dict, Iterator, List, Optional, Tuple, Union
|
||||
|
||||
from django.db.models.base import Model
|
||||
from django.db.models.fields.files import FieldFile
|
||||
from django.forms.utils import ErrorList
|
||||
from django.utils.safestring import SafeText
|
||||
|
||||
TRAILING_PUNCTUATION_CHARS: str
|
||||
@@ -11,17 +14,19 @@ word_split_re: Any
|
||||
simple_url_re: Any
|
||||
simple_url_2_re: Any
|
||||
|
||||
def escape(text: Any) -> SafeText: ...
|
||||
def escape(text: Optional[Union[Model, FieldFile, int, str]]) -> SafeText: ...
|
||||
def escapejs(value: str) -> SafeText: ...
|
||||
def json_script(
|
||||
value: Union[str, Dict[str, str]], element_id: str
|
||||
value: Union[Dict[str, str], str], element_id: str
|
||||
) -> SafeText: ...
|
||||
def conditional_escape(text: Any) -> str: ...
|
||||
def conditional_escape(
|
||||
text: Optional[Union[Model, FieldFile, ErrorList, int, str]]
|
||||
) -> str: ...
|
||||
def format_html(format_string: str, *args: Any, **kwargs: Any) -> SafeText: ...
|
||||
def format_html_join(
|
||||
sep: str,
|
||||
format_string: str,
|
||||
args_generator: Union[List[Tuple[str]], Iterator[Any]],
|
||||
args_generator: Union[Iterator[Any], List[Tuple[str]]],
|
||||
) -> SafeText: ...
|
||||
def linebreaks(value: str, autoescape: bool = ...) -> str: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user