mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-21 17:18:30 +08:00
Add defaults for third-party stubs A-D (#9952)
This commit is contained in:
@@ -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: ...
|
||||
|
||||
@@ -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: ...
|
||||
|
||||
@@ -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: ...
|
||||
|
||||
@@ -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: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user