Complete bleach (#13969)

This commit is contained in:
Semyon Moroz
2025-05-11 12:42:21 +00:00
committed by GitHub
parent a92579c0b0
commit 2a6d81b17f
3 changed files with 2 additions and 4 deletions
-1
View File
@@ -28,7 +28,6 @@
"stubs/Authlib",
"stubs/aws-xray-sdk",
"stubs/beautifulsoup4",
"stubs/bleach/bleach/sanitizer.pyi",
"stubs/boltons",
"stubs/braintree",
"stubs/caldav",
+1 -2
View File
@@ -1,4 +1,3 @@
from _typeshed import Incomplete
from collections.abc import Container, Iterable, Iterator, Sequence
from re import Pattern
from typing import Any, Final
@@ -59,4 +58,4 @@ class LinkifyFilter(Filter):
def handle_links(self, src_iter: Iterable[_Token]) -> Iterator[_Token]: ...
def handle_a_tag(self, token_buffer: Sequence[_Token]) -> Iterator[_Token]: ...
def extract_entities(self, token: _Token) -> Iterator[_Token]: ...
def __iter__(self) -> Iterator[Incomplete]: ...
def __iter__(self) -> Iterator[_Token]: ...
+1 -1
View File
@@ -24,7 +24,7 @@ class NoCssSanitizerWarning(UserWarning): ...
# A html5lib Filter class
class _Filter(Protocol):
def __call__(self, *, source: BleachSanitizerFilter): ...
def __call__(self, *, source: BleachSanitizerFilter) -> BleachSanitizerFilter: ...
_AttributeFilter: TypeAlias = Callable[[str, str, str], bool]
_AttributeDict: TypeAlias = dict[str, list[str] | _AttributeFilter] | dict[str, list[str]] | dict[str, _AttributeFilter]