Add defaults for third-party stubs A-D (#9952)

This commit is contained in:
Alex Waygood
2023-03-27 16:49:58 +01:00
committed by GitHub
parent ce5f02fcdc
commit b9fedd20ce
186 changed files with 1829 additions and 1760 deletions

View File

@@ -24,10 +24,10 @@ def clean(
tags: Iterable[str] = ...,
attributes: _Attributes = ...,
protocols: Iterable[str] = ...,
strip: bool = ...,
strip_comments: bool = ...,
css_sanitizer: CSSSanitizer | None = ...,
strip: bool = False,
strip_comments: bool = True,
css_sanitizer: CSSSanitizer | None = None,
) -> str: ...
def linkify(
text: str, callbacks: Iterable[_Callback] = ..., skip_tags: Container[str] | None = ..., parse_email: bool = ...
text: str, callbacks: Iterable[_Callback] = ..., skip_tags: Container[str] | None = None, parse_email: bool = False
) -> str: ...

View File

@@ -9,5 +9,5 @@ _HTMLAttrs: TypeAlias = MutableMapping[_HTMLAttrKey, str]
class _Callback(Protocol): # noqa: Y046
def __call__(self, attrs: _HTMLAttrs, new: bool = ...) -> _HTMLAttrs: ...
def nofollow(attrs: _HTMLAttrs, new: bool = ...) -> _HTMLAttrs: ...
def target_blank(attrs: _HTMLAttrs, new: bool = ...) -> _HTMLAttrs: ...
def nofollow(attrs: _HTMLAttrs, new: bool = False) -> _HTMLAttrs: ...
def target_blank(attrs: _HTMLAttrs, new: bool = False) -> _HTMLAttrs: ...

View File

@@ -22,6 +22,6 @@ class BleachHTMLParser(HTMLParser):
class BleachHTMLSerializer(HTMLSerializer):
escape_rcdata: bool
def escape_base_amp(self, stoken: str) -> Generator[str, None, None]: ...
def serialize(self, treewalker, encoding: str | None = ...) -> Generator[str, None, None]: ...
def serialize(self, treewalker, encoding: str | None = None) -> Generator[str, None, None]: ...
def __getattr__(__name: str) -> Incomplete: ...

View File

@@ -42,10 +42,10 @@ class Cleaner:
tags: Iterable[str] = ...,
attributes: _Attributes = ...,
protocols: Iterable[str] = ...,
strip: bool = ...,
strip_comments: bool = ...,
filters: Iterable[_Filter] | None = ...,
css_sanitizer: CSSSanitizer | None = ...,
strip: bool = False,
strip_comments: bool = True,
filters: Iterable[_Filter] | None = None,
css_sanitizer: CSSSanitizer | None = None,
) -> None: ...
def clean(self, text: str) -> str: ...