mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-16 00:37:11 +08:00
Allow Iterable[Iterable[Any]] as args_generator argument to format_html_join (#722)
* Allow List[Tuple[Any]] as args_generator argument to format_html_join format_html_join's args_generator argument can be anything that contains tuples of things that can be coerced to strings or that have a `__html__` method. Fixes #721. * Use `Iterable[Iterable[Any]]` as `args_generator` type * Run linter
This commit is contained in:
committed by
GitHub
parent
4cdf8a8d39
commit
3c1e9e3884
@@ -1,5 +1,5 @@
|
|||||||
from html.parser import HTMLParser
|
from html.parser import HTMLParser
|
||||||
from typing import Any, Iterator, List, Optional, Tuple, Union
|
from typing import Any, Iterable, List, Optional, Tuple
|
||||||
|
|
||||||
from django.utils.safestring import SafeText
|
from django.utils.safestring import SafeText
|
||||||
|
|
||||||
@@ -16,9 +16,7 @@ def escapejs(value: Any) -> SafeText: ...
|
|||||||
def json_script(value: Any, element_id: str) -> SafeText: ...
|
def json_script(value: Any, element_id: str) -> SafeText: ...
|
||||||
def conditional_escape(text: Any) -> str: ...
|
def conditional_escape(text: Any) -> str: ...
|
||||||
def format_html(format_string: str, *args: Any, **kwargs: Any) -> SafeText: ...
|
def format_html(format_string: str, *args: Any, **kwargs: Any) -> SafeText: ...
|
||||||
def format_html_join(
|
def format_html_join(sep: str, format_string: str, args_generator: Iterable[Iterable[Any]]) -> SafeText: ...
|
||||||
sep: str, format_string: str, args_generator: Union[Iterator[Any], List[Tuple[str]]]
|
|
||||||
) -> SafeText: ...
|
|
||||||
def linebreaks(value: Any, autoescape: bool = ...) -> str: ...
|
def linebreaks(value: Any, autoescape: bool = ...) -> str: ...
|
||||||
|
|
||||||
class MLStripper(HTMLParser):
|
class MLStripper(HTMLParser):
|
||||||
|
|||||||
Reference in New Issue
Block a user